Examples of evaluateAsNodeList()


Examples of org.springframework.xml.xpath.XPathExpression.evaluateAsNodeList()

    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());
View Full Code Here

Examples of org.springframework.xml.xpath.XPathExpression.evaluateAsNodeList()

        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
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.