public function writeXml($xml)
    {
        if ($this->writeObjectReference($xml)) {
            return $this;
        }

        if(is_string($xml)) {
            //nothing to do
        } else if ($xml instanceof DOMDocument) {
            $xml = $xml->saveXml();
        } else if ($xml instanceof SimpleXMLElement) {
            $xml = $xml->asXML();
        } else {
            require_once 'Zend/Amf/Exception.php';
            throw new Zend_Amf_Exception('Invalid xml specified; must be a DOMDocument or SimpleXMLElement');
        }

        $this->writeBinaryString($xml);

        return $this;
    }
public function writeXml($xml)
    {
        if ($this->writeObjectReference($xml)) {
            return $this;
        }

        if(is_string($xml)) {
            //nothing to do
        } else if ($xml instanceof DOMDocument) {
            $xml = $xml->saveXml();
        } else if ($xml instanceof SimpleXMLElement) {
            $xml = $xml->asXML();
        } else {
            require_once 'Zend/Amf/Exception.php';
            throw new Zend_Amf_Exception('Invalid xml specified; must be a DOMDocument or SimpleXMLElement');
        }

        $this->writeBinaryString($xml);

        return $this;
    }
public function writeXml ( $ xml ) { if ( $ this -> writeObjectReference ( $ xml ) ) { return $ this ; } if ( is_string ( $ xml ) ) { //nothing to do } else if ( $ xml instanceof DOMDocument ) { $ xml = $ xml -> saveXml ( ) ; } else if ( $ xml instanceof SimpleXMLElement ) { $ xml = $ xml -> asXML ( ) ; } else { require_once 'Zend/Amf/Exception.php' ; throw new Zend_Amf_Exception ( 'Invalid xml specified; must be a DOMDocument or SimpleXMLElement' ) ; } $ this -> writeBinaryString ( $ xml ) ; return $ this ; }
Send xml to output stream

@param  DOMDocument|SimpleXMLElement  $xml
@return Zend_Amf_Parse_Amf3_Serializer
Send xml to output stream