hello,

could somebody give me some direction here.

i am trying to build a RSS 2.0 parser using DOM. what puzzles me is the following -

i get the XML -

$RSS_XML = file_get_contents($params['uri']);

then i instantiate a DOM object -

$RSS_DOM = new DomDocument();

then i load the XML -

$RSS_DOM->loadXML($RSS_XML);

then i get the first node -

$NODE = $RSS_DOM->firstChild;

here $NODE->tagName is "rss", so far OK

but then if i get the first child of "rss", which is "channel" -

$NODE = $NODE->firstChild;

its type is not DomNode, but DomText.

Only the 2nd child -

$NODE = $NODE->nextSibling;

has $NODE->tagName "channel".

My question is - why is the first child after "rss" DomText?

Thank you,
Iv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to