I'm using php DOM to build an XML file of data, it works fine but it all outputs on one line, like so:
<property><something><somethingelse>dfs</somethingelse></something></property>
However in all examples I've found it's outputting properly, like so:
<property>
<something>
<somethingelse>
dfs
</somethingelse>
</something>
</property>
Now I know I can force a new line with \n and \t for tab but I don't want to do this unless necessary. So, my question:
Is my server config (for some reason) forcing it to output on the same line, or is something else happening? All examples of this in use show no new line usage and they show new lines, so I think something is wrong.
I am declaring
header('Content-Type: text/xml');