There is, but that states it is on by default anyway, and that appears to only have to do with loading XML. It will preserve the whitespace on the loaded XML, the problem is that all the nodes that I append and save are not formatted, but rather tacked on to the end. So, let's say I have this:
Code: Select all
<root>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node>
</root>
And I load the document into PHP, and append two, nodes we'll call "phpnodes", and save. The resulting XML file looks like this:
Code: Select all
<root>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node>
<node>Node text</node><phpnode>Node text</phpnode><phpnode>Node text</phpnode></root>
Notice there is no whitespace added with the phpnodes, and the root close tag has been moved up as well. These two issues, along with the strange 
 characters, are what I'm trying to resolve.