|
Posted by Sean on 04/24/07 09:55
"skrebbel" <e.pear.teeselink@student.apple.tue.banana.nl> wrote in message
news:op.tq95l61r18tlcy@s011169.mshome.net...
Is there any faster/easier way of finding a child node of a certain
DOMNode object than doing something like
function getChildByTagname($curnode, $name)
{
foreach($curnode->childNodes as $node)
{
if($node->nodeName==$name)
{
return $node;
}
}
}
?
it seems fairly slow and cumbersome. i was thinking xpath, but i can
hardly imagine that to be a lot faster, with all the DOMXpath object
creation and all, though I didn't benchmark.
-egbert
I would have thought that you could probably narrow it down with an XPATH
query, but without seeing the XML and what you're after, it's a little hard
to consider what you are looking for.
Navigation:
[Reply to this message]
|