Location: PHPKode > scripts > PHP 5 DOM XML > php-5-dom-xml/php5_dom_xml.php
<?php
$dom = new DomDocument;
$dom->load("test.xml");
print "<pre>";
print $dom->documentElement->nodeName;
print "<br/>\n";
print $dom->getElementsByTagName("test")[0];

print_r(     $dom->getElementsByTagName("test"));         
print "<br/>\n";

print htmlentities($dom->saveXML());
?>
Return current item: PHP 5 DOM XML