w2phtml/source/java/writer2latex/xhtml/Debug.java

24 lines
520 B
Java
Raw Normal View History

2017-06-16 19:34:23 +03:00
package writer2latex.xhtml;
2017-06-22 15:20:45 +03:00
import org.w3c.dom.Document;
2017-06-16 19:34:23 +03:00
import org.w3c.dom.Node;
2017-06-22 15:20:45 +03:00
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSSerializer;
2017-06-16 19:34:23 +03:00
public class Debug {
public static void printNode(Node node){
2017-06-22 15:20:45 +03:00
Document document = node.getOwnerDocument();
DOMImplementationLS domImplLS = (DOMImplementationLS) document
.getImplementation();
LSSerializer serializer = domImplLS.createLSSerializer();
String str = serializer.writeToString(node);
System.out.println(str);
2017-06-16 19:34:23 +03:00
}
}