Package org.dom4j

Examples of org.dom4j.XPath.selectSingleNode()


        XPath xpath = DocumentHelper
            .createXPath("/t2f:workflow/t2f:dataflow[@role='top']/t2f:annotations/*/*/*/*/annotationBean[@class='net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle']/text");

        xpath.setNamespaceURIs(T2FLOW_NAMESPACE_MAP);
        Node node = xpath.selectSingleNode(doc);
        if (node == null) {
            return null;
        }
        return node.getText();
    }
View Full Code Here


        XPath xpath = DocumentHelper
            .createXPath("/t2f:workflow/t2f:dataflow[@role='top']/t2f:annotations/*/*/*/*/annotationBean[@class='net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription']/text");

        xpath.setNamespaceURIs(T2FLOW_NAMESPACE_MAP);
        Node node = xpath.selectSingleNode(doc);
        if (node == null) {
            return null;
        }
        return node.getText();
    }
View Full Code Here

        XPath xpath = DocumentHelper
            .createXPath("/t2f:workflow/t2f:dataflow[@role='top']/t2f:annotations/*/*/*/*/annotationBean[@class='net.sf.taverna.t2.annotation.annotationbeans.Author']/text");

        xpath.setNamespaceURIs(T2FLOW_NAMESPACE_MAP);
        Node node = xpath.selectSingleNode(doc);
        if (node == null) {
            return null;
        }
        return node.getText();
    }
View Full Code Here

     * @return a single node or null if none found
     */
    private Node getSingleNode(Document document, String xPath) {
        XPath x = DocumentHelper.createXPath(xPath);
        x.setNamespaceURIs(T2FLOW_NAMESPACE_MAP);
        return x.selectSingleNode(document);
    }

    /**
     * Returns the content of a single 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.