I have an xml file and I would like to check it with DTD.
To do this, I have included a DTD link in XML:
<!DOCTYPE article SYSTEM "http://dtd.nlm.nih.gov/1.1/journalpublishing.dtd">
And then did:
$dom = new DOMDocument();
$dom->loadHTML($xml);
if ($dom->validate()) {
echo "This document is valid!\n";exit;
}
else {
var_dump("Not OK");exit;
}
The problem is that I get this warning:
Warning: DOMDocument::validate(http:
Any idea? Thank.
Miloš source
share