Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to remove indentation in a xml using java api ?

843834Jul 29 2006
Basically I have formatted and indented xml and I want to convert that to a unformatted and non-indented , single line xml. For example how can I convert this
<note>	
       <to>Tove</to>	
       <from>Jani</from>
       <heading>Reminder</heading>
       <body>Don't forget me this weekend!</body>
</note>
to
<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>
using java. I want to resuse any xml parser api for achieving this. Can anyone please help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2006
Added on Jul 29 2006
0 comments
331 views