I fetch data from an XML feed using cURL. I need to get a specific value from the XML.
I need the text: Gymnázium Christiana Dopplera (<D:Nazev>
)
I've tried using DOMDocument
, but I get a "Fatal error".
What am I doing wrong?
if ($curl = curl_init("http://wwwinfo.mfcr.cz/cgi-bin/ares/darv_sko.cgi?ico=61385701")) {
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($curl);
curl_close($curl);
}
$dom = new DOMDocument();
$dom = loadXML($content);
echo $dom->getElementsByTagName("Nazev");
Fatal error: Call to undefined function loadXML() in C:\www\pokusy\ares\index.php on line 13