Java XPath Get getResultXpathstring(String expr, InputSource inputSource)

Here you can find the source of getResultXpathstring(String expr, InputSource inputSource)

Description

get Result Xpathstring

License

Open Source License

Declaration

public static String getResultXpathstring(String expr, InputSource inputSource)
            throws XPathExpressionException 

Method Source Code

//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
}

Related

  1. getNodeTextByXPath(Document doc, String xpath)
  2. getNogeList(String path, Node node)
  3. getORSVersion()
  4. getProcessIdFromBpmn(final String bpmn)
  5. getPublicKeyFromKeyInfo(Node keyInfoNode)
  6. getScrProperties(String componentName)
  7. getSearchHandlerNode(final File solrconfig)
  8. getSharedXPath()
  9. getSpeficValueFromNode(Node n, String xpathExpr)