public static final function encode($a_value, $a_root = 'root') { $x = new ZXmlEncoder(); $v = $x->toXmlValue($a_root, $a_value); unset($x); return $v; }
/** * 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; }