I am using SimpleXML as follows:
to output some XML to the browser window, however it is appearing as:
<a><b><c></c></b></a>
but I would like it to appear indented (and thus readable!):
<a>
<b>
<c></c>
</b>
</a>
I know XSL and indent="yes" but I am wondering if there is a nice quick easy SimpleXML way to do this without an XSL stylesheet?
Thanks
-C
Code:
$result = $objSimpleXML->asxml();
echo "<pre>".htmlspecialchars($result)."</pre>"
to output some XML to the browser window, however it is appearing as:
<a><b><c></c></b></a>
but I would like it to appear indented (and thus readable!):
<a>
<b>
<c></c>
</b>
</a>
I know XSL and indent="yes" but I am wondering if there is a nice quick easy SimpleXML way to do this without an XSL stylesheet?
Thanks
-C