Please read and write XML using the proper XML read/write functions. Every major language should now already have proper classes or utilities to read and write XML. Therefore an XML chunk of.
<root>
<branch>some node</branch>
</root>
should be no different to
<root><branch>some node</branch></root>
since they're exactly the same XML, but if you weren't using a proper XML reader function to read it, but instead waited for a new line, then obviously you wouldn't get the value you wanted in the 2nd chunk.
so please, use the proper functions when you're dealing with XML!