Fatal error: Call to undefined static function: domdocument::loadxml()

<?php

//file
$query = “technologies.txt”;

//Create the DOM Document object from the XML returned by the query
$xml = file_get_contents($query);
$dom = new DOMDocument;
$dom = DOMDocument::loadXML($xml);

function xml_to_result($dom) {

//This function takes the XML document and maps it to a
//PHP object so that you can manipulate it later.

//First, retrieve the root element for the document
$root = $dom->firstChild;

//Next, loop through each of its attributes
foreach($root->attributes as $attr) {
$res[$attr->name] = $attr->value;
}

//Now, loop through each of the children of the root element
//and treat each appropriately.

//Start with the first child node. (The counter, i, is for
//tracking results.
$node = $root->firstChild;
$i = 0;

//Now keep looping through as long as there is a node to work
//with. (At the bottom of the loop, the code moves to the next
//sibling, so when it runs out of siblings, the routine stops.
while($node) {

//For each node, check to see whether it's a Result element or
//one of the informational elements at the start of the document.
switch($node-&gt;nodeName) {

  //Result elements need more analysis.
  case 'Result':
    //Add each child node of the Result to the result object,
    //again starting with the first child.
    $subnode = $node-&gt;firstChild;
    while($subnode) {

      //Some of these nodes just are just whitespace, which does
      //not have children.
      if ($subnode-&gt;hasChildNodes()){

        //If it does have children, get a NodeList of them, and
        //loop through it.
        $subnodes = $subnode-&gt;childNodes;
        foreach($subnodes as $n) {

          //Again check for children, adding them directly or
          //indirectly as appropriate.
          if($n-&gt;hasChildNodes()) {
            foreach($n-&gt;childNodes as $cn){
               $res[$i][$subnode-&gt;nodeName][$n-&gt;nodeName]=
                                          trim($cn-&gt;nodeValue);
            }
        } else {
            $res[$i][$subnode-&gt;nodeName]=trim($n-&gt;nodeValue);
          }
        }
      }
      //Move on to the next subnode.
      $subnode = $subnode-&gt;nextSibling;
    }
    $i++;
    break;
  //Other elements are just added to the result object.
  default:
    $res[$node-&gt;nodeName] = trim($node-&gt;nodeValue);
    break;
}

//Move on to the next Result of informational element
$node = $node-&gt;nextSibling;

}
return $res;
}

//First, convert the XML to a DOM object you can manipulate.
$res = xml_to_result($dom);

//Use one of those “informational” elements to display the total
//number of results for the query.
echo "<p>The query returns “.$res[“totalResultsAvailable”].
" total results The first 10 are as follows:</p>”;

//Now loop through each of the actual results.
for($i=0; $i<$res[‘totalResultsReturned’]; $i++) {

echo "&lt;a&gt; $res[$i]&lt;a/&gt;";
echo $res[$i]['Summary'];

echo "&lt;br /&gt;&lt;br /&gt;";

}

?>

?

hi,
i’ve built together the following code using ibms php guides however im getting this-Fatal error: Call to undefined static function: domdocument::loadxml()
ive searched google etc but luck.
any thoughts?