Пример #1
0
 public static final function encode($a_value, $a_root = 'root')
 {
     $x = new Zoombi_Xml();
     $v = $x->toXmlValue($a_root, $a_value);
     unset($x);
     return $v;
 }
Пример #2
0
 /**
  * Compile document DOM to string view
  * @param bool $a_format Format result
  * @return string
  */
 public function compile($a_format = false)
 {
     $d = parent::getData();
     if ($d) {
         return Zoombi_Xml::encode($d);
     }
     $this->m_document->preserveWhiteSpace = $this->m_flags['whitespace'];
     $this->m_document->recover = $this->m_flags['recover'];
     $f = $this->m_document->formatOutput;
     $this->m_document->formatOutput = $this->m_flags['format'];
     if ($this->m_flags['normalize']) {
         $this->m_document->normalizeDocument();
     }
     $return = $this->m_document->saveXML();
     $this->m_document->formatOutput = $f;
     return $return;
 }