src/Types/Dom.php
public function write(\XMLWriter $writer, \DateTimeZone $timezone, $stringTag)
    {
        $xml = $this->value->asXML();

        // Not all combinations of PHP/libxml support stripping
        // the XML declaration. So, we do it ourselves here.
        if (strlen($xml) >= 6 && !strncmp($xml, '<?xml', 5) &&
            strpos(" \t\r\n", $xml[5]) !== false) {
            $xml = (string) substr($xml, strpos($xml, '?>') + 2);
        }

        $writer->startElementNS(
            'ex',
            'dom',
            'http://ws.apache.org/xmlrpc/namespaces/extensions'
        );
        $writer->writeRaw($xml);
        $writer->fullEndElement();
    }
public function write(\XMLWriter $writer, \DateTimeZone $timezone, $stringTag)
    {
        $xml = $this->value->asXML();

        // Not all combinations of PHP/libxml support stripping
        // the XML declaration. So, we do it ourselves here.
        if (strlen($xml) >= 6 && !strncmp($xml, '<?xml', 5) &&
            strpos(" \t\r\n", $xml[5]) !== false) {
            $xml = (string) substr($xml, strpos($xml, '?>') + 2);
        }

        $writer->startElementNS(
            'ex',
            'dom',
            'http://ws.apache.org/xmlrpc/namespaces/extensions'
        );
        $writer->writeRaw($xml);
        $writer->fullEndElement();
    }
/ \copydoc fpoirotte::XRL::Types::AbstractType::write()