Here you can find the source of getResultXpathstring(String expr, InputSource inputSource)
public static String getResultXpathstring(String expr, InputSource inputSource) throws XPathExpressionException
//package com.java2s; //License from project: Open Source License import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressionException; import org.xml.sax.InputSource; public class Main { private static XPath xPath; public static String getResultXpathstring(String expr, InputSource inputSource) throws XPathExpressionException { XPathExpression xExpr = xPath.compile(expr); return xExpr.evaluate(inputSource); }// ww w . j a v a 2 s.c o m }