DiDom\Document::xml PHP 메소드

xml() 공개 메소드

Dumps the internal document into a string using XML formatting.
public xml ( integer $options ) : string
$options integer Additional options
리턴 string The document xml
    public function xml($options = 0)
    {
        return trim($this->document->saveXML($this->document, $options));
    }

Usage Example

예제 #1
0
 public function testToStringXml()
 {
     $xml = $this->loadFixture('books.xml');
     $document = new Document($xml, false, 'UTF-8', 'xml');
     $this->assertEquals($document->xml(), $document->__toString());
 }