> iterate the entire DOM tree, testing nodes and storing their values in
>> member variables within the class, and then working with the member
 > variables. Or, i could just iterator through the tree specifically 
looking
 > for something when i need it. The first way is not memory friendly, the
 > latter is not performance friendly

XPath itself has to do one or the other... and at the moment Xalan 
performance when operating on DOMs is not supurb, since it linearly copies 
some of the information from the DOM into its own data structures. (We 
optimized for SAX; we now need to revisit to try to improve DOM handling.) 
And XPath pays some overhead for generality and standards compliance; 
handling all the obscure little corners of the spec correctly does cost 
some cycles.

So if you're using that simple a path, and care enough about memory and 
performance issues to raise the question, you may in fact be better off 
programming your own direct search.

______________________________________
Joe Kesselman  / IBM Research

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to