Hello everyone,

I am using the following code on an XML file, which has a size of 121KB 
at the moment:

-------------------------
require "rexml/document"
include REXML

  return 13 unless (File.exists? (@controlFileName))
    controlfile = File.new(@controlFileName)
  puts "2"
    doc = Document.new(controlfile)     	 # controlfile : the XML file
  puts "3"
    XPath.each(doc,"//TITLE[../NAME/text()=\"#{@pageName}\"]") { |tag| 
    	  @element=tag}
  puts "4"   
  
    	# do something with @element

-------------------------

the result (Athlon XP1600+):

-------------------------

2
<~2.5 sec delay>
3
<~0.5 sec delay>
<output of do something>
-------------------------

I think, this is too slow. Am I expecting too much of REXML, or is 
there a problem with my code?

I could live with the 0.5 sec for finding the correct element, but 2.5 
sec for parsing a 120KB file is too much.
It seems ridiculous to use REXML in a CGI Script for example.

regards,

Andreas.