Erik Rydgren wrote:

>The getElementsByTagName method does iterate over the whole tree, comparing
>tagName with node name and in DOM2 also compares with the namespace URI. You
>do not gain anything in performance by using getElementsByTagName. But you
>do not loose any either. Then why invent the wheel again?
>
>If you are on a hunt for a specific childNode (just one matches) then use
>getElementById instead. Tag the childNode with an ID attribute and use that
>for lookups. This function is hashed to the extreme and is blazingly fast.
>
>Regards
>
Before useing getElementById, don't forget to set the attribute type to ID.
Setting the name of the attribute to id does not do it.
You either need to set it via a DTD/Xschema or use the
void XMLAttDef::setType ( ID = 1 )
method.



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

Reply via email to