Here you can find the source of getXPathType(Class c)
private static QName getXPathType(Class c)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.xpath.XPathConstants; import javax.xml.namespace.QName; public class Main { private static QName getXPathType(Class c) { if (c == Node.class) return XPathConstants.NODE; if (c == NodeList.class) return XPathConstants.NODESET; if (c == String.class) return XPathConstants.STRING; if (c == Boolean.class) return XPathConstants.BOOLEAN; if (c == Double.class) return XPathConstants.NUMBER; return null; }//from www. j ava 2 s.c om }