FluentDOM\Nodes::formatOutput PHP Méthode

formatOutput() public méthode

The document is saved and reloaded, all variables with DOMNodes of this document will get invalid.
public formatOutput ( string $contentType = NULL ) : Nodes
$contentType string
Résultat Nodes
    public function formatOutput($contentType = NULL)
    {
        if (isset($contentType)) {
            $this->setContentType($contentType);
        }
        $this->_nodes = array();
        $this->_useDocumentContext = TRUE;
        $this->_parent = NULL;
        $this->_document->preserveWhiteSpace = FALSE;
        $this->_document->formatOutput = TRUE;
        if (!empty($this->_document->documentElement)) {
            $this->_document->loadXML($this->_document->saveXML());
        }
        return $this;
    }