1° Metodo:
public void printNode(Node allNode) throws TransformerException {
System.out.println(“——————————-“);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, “yes”);
StringWriter outWriter = new StringWriter();
// transformer.transform(new DOMSource(root), new StreamResult(outWriter));
transformer.transform(new DOMSource(allNode), new StreamResult(System.out));
System.out.println(“——————————-“);
}
2° Metodo
System.setProperty(“com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump”, “true”);
System.setProperty(“com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump”, “true”);
System.setProperty(“com.sun.xml.ws.transport.http.HttpAdapter.dump”, “true”);
System.setProperty(“com.sun.xml.internal.ws.transport.http.HttpAdapter.dump”, “true”);