Package org.apache.axiom.om.xpath

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


                while (nsIter.hasNext()) {
                    OMNamespace tmpNs = (OMNamespace) nsIter.next();
                    xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                }

                Iterator nodesIterator = xp.selectNodes(envelope).iterator();

                while (nodesIterator.hasNext()) {
                    decryptedElements.put(nodesIterator.next(),
                            Boolean.valueOf(dataRef.isContent()));
                }
View Full Code Here


                while (nsIter.hasNext()) {
                    OMNamespace tmpNs = (OMNamespace) nsIter.next();
                    xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                }

                Iterator nodesIterator = xp.selectNodes(envelope).iterator();

                while (nodesIterator.hasNext()) {
                    Object result = decryptedElements.get(nodesIterator.next());
                    if (result != null
                            && ("Element".equals(encPart.getEncModifier()) ^ ((Boolean) result)
View Full Code Here

                OMElement root = builder.getDocumentElement();

                if (xpathConfigs != null) {
                    for (XPathConfigData xpathConfig : xpathConfigs) {
                        AXIOMXPath xpath = new AXIOMXPath(xpathConfig.getXpath());
                        List listOfNodes = xpath.selectNodes(root);
                        StringBuffer value = new StringBuffer();
                        if (listOfNodes != null && listOfNodes.size() > 0) {
                            for (int i = 0; i < listOfNodes.size(); i++) {
                                OMContainer omContainer = (OMContainer) listOfNodes.get(i);
View Full Code Here

        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List<OMElement> omElements = (List<OMElement>) xpathExpression.selectNodes(root);
        if (omElements == null) {
            return Collections.emptyList();
        }
        return omElements;
    }
View Full Code Here

        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List<OMAttribute> omElements = (List<OMAttribute>) xpathExpression.selectNodes(root);
        if (omElements == null) {
            return Collections.emptyList();
        }
        return omElements;
    }
View Full Code Here

        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List nodeList = xpathExpression.selectNodes(root);
        List<String> values = new ArrayList<String>();
        if (nodeList != null) {

            for (Object nodeObj: nodeList) {
                String value = ((OMAttribute)nodeObj).getAttributeValue();
View Full Code Here

        String qualifiedKey = "ns:" + key.replaceAll("\\.", "/ns:");
        AXIOMXPath xpathExpression;
        try {
            xpathExpression = new AXIOMXPath(qualifiedKey);
            xpathExpression.addNamespace("ns", PACKAGE_DESCRIPTION_CONFIG_NS);
            List valueNodes = xpathExpression.selectNodes(packageNode);
            if (valueNodes.isEmpty()) {
                if (log.isDebugEnabled()) {
                    String msg = "No results found parsing package configuration for key: " +
                            qualifiedKey + ".";
                    log.debug(msg);
View Full Code Here

        List symbolElementList = null;
        try {
            AXIOMXPath xPathSymbol = new AXIOMXPath("//ns1:USER/ns2:FirstName");
            xPathSymbol.addNamespace("ns1", "urn:sobject.enterprise.soap.sforce.com");
            xPathSymbol.addNamespace("ns2", "urn:sobject.enterprise.soap.sforce.com");
            symbolElementList = xPathSymbol.selectNodes(body);
            printFirstNames(symbolElementList);

        } catch (JaxenException e) {
            handleException("element symbol error", e, synCtx);
        }
View Full Code Here

            if (docEle != null) {
                SimpleNamespaceContext nsCtx = new SimpleNamespaceContext();
                nsCtx.addNamespace("wsas", ServerConstants.CARBON_SERVER_XML_NAMESPACE);
                XPath xp = new AXIOMXPath("//wsas:HttpGetRequestProcessors/wsas:Processor");
                xp.setNamespaceContext(nsCtx);
                List nodeList = xp.selectNodes(docEle);
                for (Object aNodeList : nodeList) {
                    OMElement processorEle = (OMElement) aNodeList;
                    OMElement itemEle = processorEle.getFirstChildWithName(ITEM_QN);
                    if (itemEle == null) {
                        throw new ServletException("Required element, 'Item' not found!");
View Full Code Here

                                                xpath.addNamespace(tokens[0], tokens[1]);
                                            }
                                        }
                                    }

                                    listOfNodes = xpath.selectNodes(root);
                                    if (listOfNodes != null && listOfNodes.size() > 0) {
                                        for (int i = 0; i < listOfNodes.size(); i++) {
                                            OMContainer omContainer = (OMContainer) listOfNodes.get(i);

                                            if (omContainer instanceof OMDocument) {
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.