Package com.volantis.mcs.eclipse.common.odom.xpath

Examples of com.volantis.mcs.eclipse.common.odom.xpath.ODOMXPath.selectSingleElement()


     */
    public void testSelectElementNode() throws Exception {

        ODOMXPath xpath = new ODOMXPath("cd[1]");
        // select the first cd element
        Element element = xpath.selectSingleElement(root);

        // ensure the node is not null
        assertNotNull("node selected was null", element);

        // check the name of the element
View Full Code Here


        // xpath to an attribute
        ODOMXPath xpath = new ODOMXPath("cd[1]/@country");

        try {
            // select the xpath. We expect an element
            xpath.selectSingleElement(root);
            fail("Expected an excpetion as xpath is to an attribute");
        } catch (XPathException e) {
            // expected
        }
    }
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.