PHP 5 simplxml asXML() problem

chomsky

Limp Gawd
Joined
Aug 18, 2004
Messages
251
I've been working with PHP 5's simplexml parser and I love how easy it is to use but when I used the asXML(filename) method I find that the file generated doesn't have the formatting I would like it to have. Everything is spilled into one line, is there a way to write the XML in the more human-readable form as below?
<root>
<child>
<grandchild>
</grandchild>
<child>
<root>
 
Well, nvm, I just processed on the string returned by asXML() used with no arguements to format correctly, but I'd still be interested to know if there is any built in method for handling it
 
Back
Top