/** * Import XML * * @param * @return */ function importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping) { $new_id = $a_mapping->getMapping("Services/MetaData", "md", $a_id); if ($new_id != "") { include_once "./Services/MetaData/classes/class.ilMDXMLCopier.php"; $id = explode(":", $new_id); $xml_copier = new ilMDXMLCopier($a_xml, $id[0], $id[1], $id[2]); $xml_copier->startParsing(); } }
/** * Constructor * * @param * @return */ function __construct($a_manifest_dom, $a_obj_id) { $this->manifest_dom = $a_manifest_dom; $path = new DOMXpath($a_manifest_dom); $path->registerNamespace("ims", "http://www.imsproject.org/xsd/imscp_rootv1p1p2"); $items = $path->query("//ims:manifest/ims:metadata"); if ($items->length == 1) { foreach ($items as $i) { //echo htmlentities($a_manifest_dom->saveXML($i)); exit; parent::__construct($a_manifest_dom->saveXML($i), $a_obj_id, $a_obj_id, ilObject::_lookupType($a_obj_id)); $this->metadata_found = true; } } }