Nodes FormatOutput - ThomasWeinert/FluentDOM GitHub Wiki

FluentDOM\Nodes::formatOutput()

FluentDOM\Nodes formatOutput();

Triggers a formatting of the document. The XML/HTML will be reloaded.

Usage

$xml = <<<XML
<nodes><one/><two/><three/></nodes>
XML;

echo FluentDOM($xml)->formatOutput();

Output

<?xml version="1.0"?>
<nodes>
  <one/>
  <two/>
  <three/>
</nodes>
⚠️ **GitHub.com Fallback** ⚠️