No Comments
PHP: XML element information
Obtaining information regarding elements in XML is relatively straight forward
// xml input file
$xmldoc = "sitemap.xml";
// test to open file
if ( !$dom = domxml_open_file($xmldoc) )
{
echo "The file cannot be loaded.";
}
else
{
// show top level item
$elem = $dom->document_element();
print_r( $elem );
}
?>
Submit a Comment