On Tue, Feb 10, 2009 at 06:45:26AM -0800, Trans wrote: > Say I have about 20 tags to find in a document and manipulate. What is > going to be the faster approach, reading through the entire tree and > handling the matching tags as it comes across them, or doing a #find > on the document for each tag.
I think it depends on the size of the document. I've found that there is a certain point (around 8MB or so IIRC) where doing SAX parsing becomes cheaper than a DOM + XPath search. I guess it also depends on the searches you're doing. I'm not being very helpful! My answer is "it depends". :-( -- Aaron Patterson http://tenderlovemaking.com/ _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel