Could any one you help me in resolving this issue.

I want to write the content to a file line by line.

I have done the following in my java class.

I have to append the some content into an xml file.
For this I am reading an xml file using FileReader and storing it into a StringBuffer variable. I am appending my content into that StringBuffer variable as well.

Now I have to write the whole content into again an xml file exactly same as it was earlier.

I have tried using \n but it appends some binary content into the xml file.

Thanks in advance.

You have a problem with the view. Which editor are you using to view the content of XML file. Due to character-set (charset), you have to open an XML file with unicode editor.