From: Andreas Pinkert Date: 2002-08-17T23:58:34+09:00 Subject: 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 = 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> ------------------------- 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.