作者:挚远-十年 | 来源:互联网 | 2018-03-24 14:16
contact.xml
J
J
J
National
1971-12-22
php代码
type == XML_ELEMENT_NODE) {
print ($indent . $node->tagname . "\n");
$kids = $node->children ();
$nkids = count ($kids);
if ($nkids > 0) {
$depth++;
for ($i = 0; $i <$nkids; $i++)
walk_tree ($kids[$i], $depth);
$depth--;
}
}
}
$doc = xmldocfile (&#39;contact.xml&#39;);
print ("\n");
walk_tree ($doc->root ());
print ("
\n");
?>