I am using a php5 script to insert data into an xml file. The problem I
am having is that when I insert a new child node, it is inserted on the
same line as the node it is supposed to be inserted before. It all works
but makes for a sloppy XML file after inserting new child nodes.
example:
<songs>
<song artist="blah"/><song artist="blah2"/>
</songs>
instead of
<songs>
<song artist="blah"/>
<song artist="blah2"/>
</songs>
This is how I would like it. How do I get it to \r\n after inserting the
new child?
Thanks in advance for any help.
am having is that when I insert a new child node, it is inserted on the
same line as the node it is supposed to be inserted before. It all works
but makes for a sloppy XML file after inserting new child nodes.
example:
<songs>
<song artist="blah"/><song artist="blah2"/>
</songs>
instead of
<songs>
<song artist="blah"/>
<song artist="blah2"/>
</songs>
This is how I would like it. How do I get it to \r\n after inserting the
new child?
Thanks in advance for any help.
Comment