Reply to DOM child finding

Your name:

Reply:


Posted by skrebbel on 04/24/07 08:52

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=3D=3D$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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация