You probably can’t change this - the method prints a tree using plain text and ansi characters which represent the tree structure. If you want a more traditional view of your xml, try using this code (which employs xerces):
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
..
// Serialize the document
Document mydoc = (Document) xmlObject.getDocument();
OutputFormat format = new OutputFormat(myDoc);
format.setLineWidth(65);
format.setIndenting(true);
format.setIndent(2);
XMLSerializer serializer = new XMLSerializer(System.out, format);
serializer.serialize(myDoc);
If this doesn’t deliver exactly what you need, you could try using xalan to apply a stylesheet and print the result. Then you would have complete control over the output appearance.
HTH
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management