Package org.apache.axiom.om.xpath

Examples of org.apache.axiom.om.xpath.AXIOMXPath.selectNodes()


    AXIOMXPath axiomXpath;
    List<OMNode> nodeList = null;
    try {
      axiomXpath = new AXIOMXPath(xpath);
      nodeList = axiomXpath.selectNodes(elt);
    } catch (JaxenException e) {
      String msg = "Error occurred while reading the Xpath (" + xpath + ")";
      log.error(msg, e);
      throw new CloudControllerException(msg, e);
    }
View Full Code Here


    AXIOMXPath axiomXpath;
    List<OMNode> nodeList = null;
    try {
      axiomXpath = new AXIOMXPath(xpath);
      nodeList = axiomXpath.selectNodes(documentElement);
    } catch (JaxenException e) {
      String msg = "Error occurred while reading the Xpath (" + xpath + ")";
      log.error(msg, e);
      throw new CloudControllerException(msg, e);
    }
View Full Code Here

    AXIOMXPath axiomXpath;
    List<OMNode> nodeList = null;
    try {
      axiomXpath = new AXIOMXPath(xpath);
      nodeList = axiomXpath.selectNodes(elt);
    } catch (JaxenException e) {
      String msg = "Error occurred while reading the Xpath (" + xpath + ")";
      log.error(msg, e);
      throw new CloudControllerException(msg, e);
    }
View Full Code Here

    String xpath = POLICIES_ELEMENT_XPATH;

    AXIOMXPath axiomXpath;
    axiomXpath = new AXIOMXPath(xpath);
    @SuppressWarnings("unchecked")
    List<OMNode> policyNodes = axiomXpath.selectNodes(documentElement);

    if (policyNodes == null || policyNodes.isEmpty()) {
      log.warn("No policies found in the file : " + policiesXML.getPath());
      return;
    }
View Full Code Here

     */
    public static String parseFullQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        List lastNodes = xPath.selectNodes(result);

        if (lastNodes == null) {
            throw new Exception("Unexpected response : " + result);
        }

View Full Code Here

     */
    public static String parseMarketActivityResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        List lastNodes = xPath.selectNodes(result);

        if (lastNodes == null) {
            throw new Exception("Unexpected response : " + result);
        }

View Full Code Here

        if (nsURI != null) {
            SimpleNamespaceContext nsContext = new SimpleNamespaceContext();
            nsContext.addNamespace(null, nsURI);
            xpath.setNamespaceContext(nsContext);
        }
        return xpath.selectNodes(element);
    }


}
View Full Code Here

        try {
            String xPathExpr = seperator + seperator + nsPrefix + colon + echoStringArrayResponse +
                    seperator + ret + seperator + item;
            AXIOMXPath xpath = new AXIOMXPath(xPathExpr);
            addNamespaces(xpath);
            List itemElems = xpath.selectNodes(payload);
            assertNotNull(itemElems);
            assertEquals(itemElems.size(), 3);

            Iterator iter = itemElems.iterator();
            OMElement itemElem = (OMElement)iter.next();
View Full Code Here

        try {
            String xPathExpr = seperator + seperator + nsPrefix + colon + echoIntegerArrayResponse +
                    seperator + ret + seperator + item;
            AXIOMXPath xpath = new AXIOMXPath(xPathExpr);
            addNamespaces(xpath);
            List itemElems = xpath.selectNodes(payload);
            assertNotNull(itemElems);
            assertEquals(itemElems.size(), 3);

            Iterator iter = itemElems.iterator();
            OMElement itemElem = (OMElement)iter.next();
View Full Code Here

        try {
            String xPathExpr = seperator + seperator + nsPrefix + colon + echoFloatArrayResponse +
                    seperator + ret + seperator + item;
            AXIOMXPath xpath = new AXIOMXPath(xPathExpr);
            addNamespaces(xpath);
            List itemElems = xpath.selectNodes(payload);
            assertNotNull(itemElems);
            assertEquals(itemElems.size(), 3);

            Iterator iter = itemElems.iterator();
            OMElement itemElem = (OMElement)iter.next();
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.