39 $this->tObject=$tObject;
41 $this->sEncoding=
'UTF-8';
43 $this->sRootName=
'root';
44 $this->sItemName=
'item';
52 $this->sEncoding=$sEncoding;
60 $this->sRootName=$sRootName;
68 $this->sItemName=$sItemName;
76 $this->tColumn=$tColumn;
84 header (
"Content-Type:text/xml");
97 $this->sXml.=
'<?xml version="1.0" encoding="'.$this->sEncoding.
'"?>';
99 $this->open($this->sRootName);
101 foreach($this->tObject as $oObject){
103 $this->open($this->sItemName);
105 foreach($this->tColumn as $sColumn){
106 $this->add($sColumn,$oObject->$sColumn);
109 $this->close($this->sItemName);
112 $this->close($this->sRootName);
118 private function add($sTag,$sValue){
119 $this->sXml.=
'<'.$sTag.
'><![CDATA['.$sValue.
']]></'.$sTag.
'>';
122 private function open($sTag){
123 $this->sXml.=
'<'.$sTag.
'>';
125 private function close($sTag){
126 $this->sXml.=
'</'.$sTag.
'>';