Package org.jaxen

Examples of org.jaxen.BaseXPath


    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/underscore.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())
        {
            Object context = iter.next();
            assertCountXPath(1, context, "/root/@a");
View Full Code Here


    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/web.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())
        {
            Object context = iter.next();
            assertValueOfXPath("true", context, "/web-app/servlet/servlet-name = 'file'");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/numbers.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())
        {
            Object context = iter.next();
            assertValueOfXPath("true", context, "/numbers/set/nr = '-3'");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/numbers.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())
        {
            Object context = iter.next();
            assertValueOfXPath("true", context, "(8 * 2 + 1) = 17");
View Full Code Here

    {
        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())
        {
            Object context = iter.next();
            assertCountXPath(1, context, "//processing-instruction()");
View Full Code Here

    {
        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");
        varContext.setVariableValue(null, "foo", "foo");
        getContextSupport().setVariableContext(varContext);
        Iterator iter = list.iterator();
View Full Code Here

    {
        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())
        {
            Object context = iter.next();
            /* attributes have a parent: their element
View Full Code Here

    {
        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())
        {
            Object context = iter.next();
            assertCountXPath(1, context, "parent::foo");
View Full Code Here

    {
        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())
        {
            Object context = iter.next();
            assertCountXPath(3, context, "//processing-instruction()");
View Full Code Here

    {
        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())
        {
            Object context = iter.next();
            assertCountXPath(3, context, "evaluate('//jumps/*')");
 
View Full Code Here

TOP

Related Classes of org.jaxen.BaseXPath

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.