Esempio 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 ZXmlEncoder::encode($d);
     }
     $this->m_document->preserveWhiteSpace = false;
     $this->m_document->recover = false;
     $f = $this->m_document->formatOutput;
     $this->m_document->formatOutput = (bool) $a_format;
     $this->m_document->normalizeDocument();
     $return = $this->m_document->saveXML();
     $this->m_document->formatOutput = $f;
     return $return;
 }
Esempio n. 2
0
 public function compile()
 {
     return ZJsonEncoder::encode(parent::getData());
 }