Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 public function compile()
 {
     return Zoombi_Json::encode(parent::getData());
 }