[RESOLVED] DOMDocument - Formatting XML output file.
I'm sure this will have been asked before but I cant find it in the forums - How can I format the output of an XML file that has been created using DOMDocument so that it's tags are nested properly when viewing it in a text editor, By default it just outputs a single line with no breaks... or am I missing something?
Thanks in advance!
See if this works better (I'm just going by some users' notes, I've not tried it):
$domDocObj->formatOutput = true;
$domDocObj->preserveWhitespace = false;
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Spot On mate!! Thanks heaps... I knew it would be something simple.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread