diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/XmlRpc/Generator/XmlWriter.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/XmlRpc/Generator/XmlWriter.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,92 @@ +_xmlWriter = new XMLWriter(); + $this->_xmlWriter->openMemory(); + $this->_xmlWriter->startDocument('1.0', $this->_encoding); + } + + + /** + * Open a new XML element + * + * @param string $name XML element name + * @return void + */ + protected function _openElement($name) + { + $this->_xmlWriter->startElement($name); + } + + /** + * Write XML text data into the currently opened XML element + * + * @param string $text XML text data + * @return void + */ + protected function _writeTextData($text) + { + $this->_xmlWriter->text($text); + } + + /** + * Close an previously opened XML element + * + * @param string $name + * @return void + */ + protected function _closeElement($name) + { + $this->_xmlWriter->endElement(); + + return $this; + } + + public function saveXml() + { + return $this->_xmlWriter->flush(false); + } +} \ No newline at end of file