public function toString()
    {
        $doc = new DOMDocument('1.0');
        $doc->formatOutput = true;
        $this->appendXml($doc);
        $xmlstr = $doc->saveXML();

        return trim(preg_replace('/<\?xml.*?\?>/', '', $xmlstr));
    }
public function toString()
    {
        $doc = new DOMDocument('1.0');
        $doc->formatOutput = true;
        $this->appendXml($doc);
        $xmlstr = $doc->saveXML();

        return trim(preg_replace('/<\?xml.*?\?>/', '', $xmlstr));
    }
public function toString ( ) { $ doc = new DOMDocument ( '1.0' ) ; $ doc -> formatOutput = true ; $ this -> appendXml ( $ doc ) ; $ xmlstr = $ doc -> saveXML ( ) ; return trim ( preg_replace ( '/<\?xml.*?\?>/' , '' , $ xmlstr ) ) ; }
String representation of the current object.

This is an xml representation with the XML declaration removed.

@see        appendXml()
String representation of the current object .