How to save a the content into the file with neat alignment?

Posted by praveenjayapal on Stack Overflow See other posts from Stack Overflow or by praveenjayapal
Published on 2010-06-15T10:28:51Z Indexed on 2010/06/15 12:22 UTC
Read the original article Hit count: 226

Filed under:
|
|
|

Hi Friends,

I am having a textbox, in that i have loaded a xml file. After editing and saving the xml content into the xml file, the content is not in the right formate. While loading again, its not in the xml format
How to save a the content into the file with neat alignment?
Please help me

For Example
I need to save like the following

<section>
<value>a</value>
<value>b</value>
</section>

But after saving its looks like

<section><value>a</value><value>b</value></section>

Thanks,
Praveen J

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript