Hi, NG!
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:
<Data>
<Article>
<Number>3746</Number>
<Description>This is the article description</Description>
<Groups>
<Group1>Group1</Group1>
<Group2>Group2</Group2>
<Group3>Group3</Group3>
</Groups>
</Article>
</Data>
having the current node "Groups", I call
//-- snip
$childNodes = $curNode->child_nodes();
echo "Number of child-nodes: " . count($childNodes) . "<br>";
//-- /snip
The output is: "Number of child-nodes: 7"
When I echo the node_name() of each child-node, every second node is
called #text
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,
Gert.