Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- xml parsing
- Gert Mellak
September 10, 2004, 7:39 am
rate this thread
I've spent many hours trying to understand why the dom-functions in
php do this and that, but the following I can't understand:
My xml-file looks like:
<Description>This is the article description</Description>
having the current node "Groups", I call
$childNodes = $curNode->child_nodes();
echo "Number of child-nodes: " . count($childNodes) . "<br>";
The output is: "Number of child-nodes: 7"
When I echo the node_name() of each child-node, every second node is
Could anyone of you explain why php reacts like this? I would expect a
child-count of three and definitely no #text-nodes...
Thanks in advance,
- Zurab Davitiani
September 10, 2004, 2:48 pm
- Janwillem Borleffs
September 10, 2004, 7:06 pm