Image Image Image Image Image Image Image Image Image Image

Technology Blog | JasonSlater.co.uk Technology News | May 25, 2013

Scroll to top

Top

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 );
}
?>

Tags

Submit a Comment