Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/XmlRpc/Generator/DomDocument.php
Go to the documentation of this file.
00001 <?php
00026 require_once 'Zend/XmlRpc/Generator/GeneratorAbstract.php';
00027 
00031 class Zend_XmlRpc_Generator_DomDocument extends Zend_XmlRpc_Generator_GeneratorAbstract
00032 {
00036     protected $_dom;
00037 
00041     protected $_currentElement;
00042 
00049     protected function _openElement($name)
00050     {
00051         $newElement = $this->_dom->createElement($name);
00052 
00053         $this->_currentElement = $this->_currentElement->appendChild($newElement);
00054     }
00055 
00061     protected function _writeTextData($text)
00062     {
00063         $this->_currentElement->appendChild($this->_dom->createTextNode($text));
00064     }
00065 
00074     protected function _closeElement($name)
00075     {
00076         if (isset($this->_currentElement->parentNode)) {
00077             $this->_currentElement = $this->_currentElement->parentNode;
00078         }
00079     }
00080 
00086     public function saveXml()
00087     {
00088         return $this->_dom->saveXml();
00089     }
00090 
00096     protected function _init()
00097     {
00098         $this->_dom = new DOMDocument('1.0', $this->_encoding);
00099         $this->_currentElement = $this->_dom;
00100     }
00101 }
 All Data Structures Namespaces Files Functions Variables Enumerations