Examples of XPathExpression


Examples of org.apache.commons.jelly.tags.xml.XPathExpression

                log.debug( "Parsing XPath expression: " + attributeValue );
            }
           
            try {
                XPath xpath = new Dom4jXPath(attributeValue);
                return new XPathExpression(xpath);
            }
            catch (JaxenException e) {
                throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );           
            }           
        }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.CryptoCoverageChecker.XPathExpression

    @Test
    public void testSignedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no prefixes.
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                null,
                Arrays.asList(new XPathExpression(
                        "//*", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no expressions.
        this.runInterceptorAndValidate(
View Full Code Here

Examples of org.pdf4j.saxon.sxpath.XPathExpression

    public static void main(String[] args) throws Exception {
        Configuration config = new Configuration();
        Expression exp;
        if (args[0].equals("xpath")) {
            XPathEvaluator xpath = new XPathEvaluator(config);
            XPathExpression xpexp = xpath.createExpression(args[1]);
            exp = xpexp.getInternalExpression();
        } else if (args[0].equals("xquery")) {
            StaticQueryContext sqc = new StaticQueryContext(config);
            sqc.setBaseURI(new File(args[1]).toURI().toString());
            XQueryExpression xqe = sqc.compileQuery(new FileReader(args[1]));
            exp = xqe.getExpression();
View Full Code Here

Examples of org.springframework.xml.xpath.XPathExpression

    Traffic traffic = new Traffic();
    try {   
      Document document =
        DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputMessage.getBody());

      XPathExpression titlesXp = XPathExpressionFactory.createXPathExpression("/ResultSet/Result[@type='incident']/Title");
      List<Node> titles = titlesXp.evaluateAsNodeList(document);
      XPathExpression descXp = XPathExpressionFactory.createXPathExpression("/ResultSet/Result[@type='incident']/Description");
      List<Node> description = descXp.evaluateAsNodeList(document);
      int counter = 0;
      for (Node node : titles) {
        traffic.addIncident(((Element)node).getTextContent(), ((Element)description.get(counter++)).getTextContent());
      }
    } catch (Exception e) {
View Full Code Here

Examples of org.w3c.dom.xpath.XPathExpression

    XPathNSResolver resolver,
    short type,
    Object result)
    throws XPathException, DOMException {
     
    XPathExpression xpathExpression = createExpression(expression, resolver);
   
    return  xpathExpression.evaluate(contextNode, type, result);
  }
View Full Code Here

Examples of org.w3c.dom.xpath.XPathExpression

    XPathNSResolver resolver,
    short type,
    Object result)
    throws XPathException, DOMException {
     
    XPathExpression xpathExpression = createExpression(expression, resolver);
   
    return  xpathExpression.evaluate(contextNode, type, result);
  }
View Full Code Here

Examples of org.w3c.dom.xpath.XPathExpression

    XPathNSResolver resolver,
    short type,
    Object result)
    throws XPathException, DOMException {
     
    XPathExpression xpathExpression = createExpression(expression, resolver);
   
    return  xpathExpression.evaluate(contextNode, type, result);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.