REXML again

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 =
puts “2"
doc = # controlfile : the XML file
puts “3"
XPath.each(doc,”//TITLE[…/NAME/text()=”#{@pageName}"]") { |tag|
puts “4”

	# do something with @element

the result (Athlon XP1600+):

<~2.5 sec delay>
<~0.5 sec delay>

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.