Easy function for basic output of XML file via DOM parsing
<?php
$dom = new DomDocument();
$dom->load("./file.xml") or die("error");
$start = $dom->documentElement;
fc($start);
function fc($node) {
$child = $node->childNodes;
foreach($child as $item) {
if ($item->nodeType == XML_TEXT_NODE) {
if (strlen(trim($item->nodeValue))) echo trim($item->nodeValue)."<br/>";
}
else if ($item->nodeType == XML_ELEMENT_NODE) fc($item);
}
}
?>