/**
  * save anchors
  *
  * @param	string		xml page code
  */
 function saveAnchors($a_xml)
 {
     $doc = domxml_open_mem($a_xml);
     ilPageObject::_deleteAnchors($this->getParentType(), $this->getId());
     // get all anchors
     $xpc = xpath_new_context($doc);
     $path = "//Anchor";
     $res =& xpath_eval($xpc, $path);
     $saved = array();
     for ($i = 0; $i < count($res->nodeset); $i++) {
         $name = $res->nodeset[$i]->get_attribute("Name");
         if (trim($name) != "" && !in_array($name, $saved)) {
             ilPageObject::_saveAnchor($this->getParentType(), $this->getId(), $name);
             $saved[] = $name;
         }
     }
 }