<?php
include("example.inc");
if (!$dom = domxml_open_mem($xmlstr)) {
echo "Error while parsing the document\n";
exit;
}
$root = $dom->document_element();
if ($attribute = $root->get_attribute_node('language')) {
echo 'Language is: ' . $attribute->value() . "\n";
}
?>