Package org.dom4j

Examples of org.dom4j.XPath.selectNodes()


    }

    public List selectNodes(String xpathExpression) {
        XPath xpath = createXPath(xpathExpression);

        return xpath.selectNodes(this);
    }

    public List selectNodes(String xpathExpression,
            String comparisonXPathExpression) {
        return selectNodes(xpathExpression, comparisonXPathExpression, false);
View Full Code Here


       
        for (String xpathString : excludedNodes) {

            XPath xpath = doc.createXPath(xpathString);
   
            List<Node> l = xpath.selectNodes(root);

            for (Node n : l) {
                n.detach();
            }
        }
View Full Code Here

        xPath.setNamespaceURIs(Collections.singletonMap("xdt", XdtConstants.XDT_NAMESPACE));


        Document workingCopy = (Document) inputDocument.clone();

        List<Element> xdtNode = xPath.selectNodes(transformDocument);

        List<Transform> transformToApply = new ArrayList<Transform>();

        if (LOG.isInfoEnabled())
            LOG.info("Found {} elements to process", xdtNode.size());
View Full Code Here

        for (int ii = 0; ii < kk; ii++) {

            try {

                List nodeList = xpath.selectNodes(document);
                if ((nodeList != null) && (nodeList.size() > 0)) {
                    Node node = (Node) nodeList.get(0);
                    if ((node != null) & (ii == 0)) {
                        String val = node.getStringValue();
                        // System.out.println(val);
View Full Code Here

        for (int ii = 0; ii < kk; ii++) {

            try {

                List nodeList = xpath.selectNodes(document);
                if ((nodeList != null) && (nodeList.size() > 0)) {
                    Node node = (Node) nodeList.get(0);
                    if ((node != null) & (ii == 0)) {
                        String val = node.getStringValue();
                        // System.out.println("xpathNodes OK:"+val);
View Full Code Here

        }

        getLogger().debug("XPATH: " + xpath_string);

        XPath xpathSelector = DocumentHelper.createXPath(xpath_string);
        List nodes = xpathSelector.selectNodes(doc);

        if (nodes.isEmpty()) {
            getLogger().error(".act(): No nodes: " + xpath_string);
            getLogger().error(".act(): No child added!");
View Full Code Here

    }

    public List<Node> selectNodes(String xpathExpression) {
        XPath xpath = createXPath(xpathExpression);

        return xpath.selectNodes(this);
    }

    public List<Node> selectNodes(String xpathExpression,
            String comparisonXPathExpression) {
        return selectNodes(xpathExpression, comparisonXPathExpression, false);
View Full Code Here

/*     */   }
/*     */
/*     */   public List selectNodes(String xpathExpression) {
/* 164 */     XPath xpath = createXPath(xpathExpression);
/*     */
/* 166 */     return xpath.selectNodes(this);
/*     */   }
/*     */
/*     */   public List selectNodes(String xpathExpression, String comparisonXPathExpression)
/*     */   {
/* 171 */     return selectNodes(xpathExpression, comparisonXPathExpression, false);
View Full Code Here

       
        XPath xpath = DocumentHelper.createXPath("/tms:createTaskRequest/tms:task/tms:input//*");
        HashMap map = MessageConstants._nsMap;
        map.put("tms", TMS_NS);
        xpath.setNamespaceURIs(MessageConstants._nsMap);
        List allTaskInputElements = xpath.selectNodes(request);
       
       
        xpath = DocumentHelper.createXPath("//*");
        List allBody = xpath.selectNodes(request);
        int size = allBody.size();
View Full Code Here

        xpath.setNamespaceURIs(MessageConstants._nsMap);
        List allTaskInputElements = xpath.selectNodes(request);
       
       
        xpath = DocumentHelper.createXPath("//*");
        List allBody = xpath.selectNodes(request);
        int size = allBody.size();
        LOG.debug(allTaskInputElements.size()+":"+size);
        for (int i = 0; i < size; ++i) {
            Node node = (Node)allBody.get(i);
            if (! allTaskInputElements.contains(node)) {
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.