Here you can find the source of transformerExceptionMsg(TransformerException ex, Node contextNode, String str)
private static void transformerExceptionMsg(TransformerException ex, Node contextNode, String str)
//package com.java2s; //License from project: Open Source License import javax.xml.transform.TransformerException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { private static void transformerExceptionMsg(TransformerException ex, Node contextNode, String str) { System.out.println("[XPathUtil] Transformer exception selecting " + "XObject for " + "XPath String " + str + " with context node " + nodeToString(contextNode) + ": " + ex); }//from ww w . j av a2s . co m public static String nodeToString(Node node) { String ret = "<null/>"; if (node != null) { ret = "<" + node.getNodeName() + " "; NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { for (int i = 0; i < attrs.getLength(); i++) { Node attr = (Node) attrs.item(i); ret = ret + attr.getNodeName() + "='"; ret = ret + attr.getNodeValue() + "' "; } } ret = ret + "/>"; } return ret; } }