Codice PHP:
$xml=fread($fp,filesize("file.xml"));
    
$dom->loadXML($xml);
    
$root=$dom->documentElement;
    if (
$nodeengine=$root->getElementsByTagName("engine")&&$nodeactive=$root->getElementsByTagName("active"))
        if (
$nodeengine->item(0)->nodeValue=="on"&&$nodeactive->item(0)->nodeValue=="off")
            echo 
"OK"
Produce l'errore:
codice:
Call to a member function item() on a non-object