src/SVG.php
public function toXMLString($standalone = true)
    {
        $writer = new SVGWriter($standalone);
        $writer->writeNode($this->document);

        return $writer->getString();
    }
public function toXMLString($standalone = true)
    {
        $writer = new SVGWriter($standalone);
        $writer->writeNode($this->document);

        return $writer->getString();
    }
public function toXMLString ( $ standalone = true ) { $ writer = new SVGWriter ( $ standalone ) ; $ writer -> writeNode ( $ this -> document ) ; return $ writer -> getString ( ) ; }
Converts this image's document tree into an XML source code string.

Note that an image parsed from an XML string might not have the exact
same XML string generated by this method, since the output is optimized
and formatted according to specific rules.

@param bool $standalone optional, false omits the leading <?xml tag

@return string This image's document tree as an XML string.
Converts this image s document tree into an XML source code string .