I'm trying to parse a simple xml file, but I keep getting a strange error at
$node->name which returns #text. Is this normal or am I doing something
wrong?
>From what I understand, the $node->name should return "branch" but it
returns #text.
TIA
Jon
----------- PHP Code -------------------------
<?php
$xmlDoc = xmldocfile("xml_navigation.xml");
$root = $xmlDoc->root();
$node = array_shift($root->children());
print $node->name;
?>
------- xml_navigation.xml File -------------------------
<branch title="Home" href="/">
<branch title="News" href="news/"></branch>
<branch title="dotPlan" href="dotplan/"></branch>
<branch title="Projects" href="projects/">
<branch title="Accessibility" href="gap/"></branch>
<branch title="Documentation" href="gdp/">
<branch title="News" href="news/"></branch>
<branch title="Status Reports" href="status/"></branch>
<branch title="Joining" href="joining/"></branch>
<branch title="Tasks" href="tasks/"></branch>
<branch title="Resources" href="resources/"></branch>
</branch>
<branch title="Packaging" href="gpp/"></branch>
<branch title="Translation" href="gtp/"></branch>
<branch title="Usability" href="gup/"></branch>
<branch title="Webhackers" href="gwh/"></branch>
</branch>
<branch title="Sitemap" href="sitemap/"></branch>
</branch>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php