New Lines in XML files

oki… I have to have a block of text to be saved in an XML file. But when I have newlines in the XML file and I try to get the XML file to parse in PHP, I only get the last line (i.e. the text after the last new line)

How can I get around this…

my XML file looks like the following


<HOME>
	<MAINTEXT>First Line
Another Line</MAINTEXT>
	<NEWS>
	</NEWS>
</HOME>

but php just reads “Another Line”

Please help
-Aditya

well… u admin guys can close this topic if u want… I figured the thing out. But for those who may need the same info. All you need to do is when writing the XML file, replace all instances of "
" with some fake newline character like “-nl-”. Then when readin it you can replace all instances of “-nl-” with "
". And it works!

-Aditya
:thumb: