Code has been added to clipboard!

Viewing Source in PHP DOMDocument

Example
<?php
  $xml_doc = new DOMDocument();
  $xml_doc->load('note.xml');

  $i = $xml_doc->documentElement;
  foreach ($i->childNodes AS $item) {
    print $item->nodeName . " = " . $item->nodeValue . "<br>";
  }
?>