From: Raymond Schanks on
Assume I have a XML docuemnt in file mydoc123.xml
The XML doc is textually formatted as one long line/string without line breaks.

Now I want to read this XML doc file into Java, then reformat it so
that the hierarchy levels are indented in a human radble format "as usual".

Finally the result should be written to another text file result.xml

How can I do this most easily (preferable without third party libraries but
only J2SE built-in functions)?

Ray