DiDom\Document::xml PHP Méthode

xml() public méthode

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

Usage Example

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