Something Wrong with this...

[email protected] (PHP) Sun, 23 Nov 2003 22:49:11 +0800
Newsgroups php.xml.dev
Message-ID <[email protected]>
Hi there,

   I've used the domxml and find that something is not right...for example.

I run some code like this:
xmlfile = "myxml.xml";
$xmldom = domxml_open_file( realpath($xmlfile) ) or die("Couldn't load 
xmlfile...");

root = $xmldom->document_element();
$node = $root->child_nodes();
echo count($node); // I got 7 children instead of 3

why is did I get 7 children instead of 3 where I suppose to have only 3 
children in myxml.xml file

therefore if I do something like this:

echo $node[*]->get_attribute("Category");
where * is number 1 , 3 and 5

I get results....If the number is 2,4,6 and 7, there will be errors