I have a simple question about the Java XML API, and I hope that there will be a simple answer:
Suppose that after processing I have the following XML output:
<a>
<b><c>
<d> <e> some content
</e> </d>
</c> </b>
</a>
The structure is correct, but spaces are everywhere. The question is, how can I prefix the output so that it looks something like this:
<a>
<b>
<c>
<d>
<e>some content</e>
</d>
</c>
</b>
</a>
Only to catch that I cannot use anything but the Java 5 native XML API.
source
share