Writing a xml file using Document object in java

java , xml Sri Lanka
  • 13 years ago

    Hi All !!

    I'm writing xml using the Document object in java. Then I use Transformer class to write down xml into an text file. Problem is, all xml lines are get written to file as a one line. I wnat to break each xml line. So I wnat to add the "carriage return key" at the end of each line.

    So is there a way to do this using Document object model and Transformer class ? 

    Thanks all ! 

     

     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'” - Isaac Asimov