Package org.jaxen

Examples of org.jaxen.Navigator


    }

    /* test cases for preceding axis with different node types
    */
    public void testid53850() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/pi2.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/a/c", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here


            assertValueOfXPath("order-by=\"x\"", context, "preceding-sibling::node()[2]");
        }
    }

    public void testid53911() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/id.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        SimpleVariableContext varContext = new SimpleVariableContext();
        varContext.setVariableValue(null, "foobar", "foobar");
View Full Code Here

            assertCountXPath(0, context, "CD_Library/artist[@name=$artist]");
        }
    }

    public void testid53957() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/id.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

    }

    /* attributes can also be used as context nodes
    */
    public void testid53975() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/id.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/foo/@id", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

            assertCountXPath(1, context, "parent::foo");
        }
    }

    public void testid53992() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/pi.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

    }

    /* test evaluate() extension function
    */
    public void testid54032() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/evaluate.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

            assertCountXPath(1, context, "//metatest[ evaluate(@select) = . ]");
        }
    }

    public void testid54082() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/numbers.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/numbers/set[1]", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

   
    */
    /* test sibling axes
    */
    public void testid54145() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/axis.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/root", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

            assertCountXPath(0, context, "preceding-sibling::*");
        }
    }

    public void testid54156() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/axis.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/root/a/a.3", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

            assertCountXPath(2, context, "preceding::*");
        }
    }

    public void testid54168() throws JaxenException {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/axis.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/root/a/a.3", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext()) {
View Full Code Here

TOP

Related Classes of org.jaxen.Navigator

Copyright © 2018 www.massapicom. 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.