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?