Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031 include_once 'classes/class.ilXmlWriter.php';
00032 include_once 'Services/MetaData/classes/class.ilMD.php';
00033
00034 class ilMD2XML extends ilXmlWriter
00035 {
00036 var $md_obj = null;
00037 var $export_mode = false;
00038
00039 function ilMD2XML($a_rbac_id,$a_obj_id,$a_type)
00040 {
00041 $this->md_obj =& new ilMD($a_rbac_id,$a_obj_id,$a_type);
00042
00043 parent::ilXmlWriter();
00044 }
00045
00046 function setExportMode($a_export_mode = true)
00047 {
00048 $this->export_mode = $a_export_mode;
00049 }
00050
00051 function getExportMode()
00052 {
00053 return $this->export_mode;
00054 }
00055
00056 function startExport()
00057 {
00058
00059 $this->md_obj->setExportMode($this->getExportMode());
00060 $this->md_obj->toXML($this);
00061 }
00062
00063 function getXML()
00064 {
00065 $xml = $this->xmlDumpMem();
00066 if(!ini_get('magic_quotes_gpc'))
00067 {
00068 return stripslashes($xml);
00069 }
00070 return $xml;
00071 }
00072
00073
00074 }
00075 ?>