At 18.06 14/09/2003 -0400, you wrote:
I have a question about how to effectively parser a large DOM document.  For
example, I have a lot of 'PatchData' elements.  I am looking for the set of
these where the child element 'CbName' matches a certain string.  The
following code takes 30 seconds just to loop through the DOMNodeList before
it finds the first matching child.  How can I make this faster?

If you just need the first matching node, don't use getElementsByTagNameNS, but directly iterate over the child node; that's because when you call getElementsByTagNameNS you are going to iterate over all the child nodes, and build a list containing all the "PatchData" elements.


Alberto



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



Reply via email to