Package org.jaxen

Examples of org.jaxen.XPath


    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/much_ado.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(5, context, "/descendant::ACT");
View Full Code Here


    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/much_ado.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/PLAY/ACT[2]/SCENE[1]", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext())
        {
            Object context = iter.next();
            assertCountXPath(5, context, "/descendant::ACT");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/much_ado.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();
            /* Test correct predicate application
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();
            /* Reported as Jira issue JAXEN-24
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/text.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();
            try
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/text.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/foo/bar/cheese[1]", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext())
        {
            Object context = iter.next();
            assertValueOfXPath("3foo3", context, "concat(./@id,'foo',@id)");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/message.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("Pruefgebiete", context, "/message/body/data/items/item[name/text()='parentinfo']/value");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/simple.xml";
        log("Document [" + url + "]");
        Object document = nav.getDocument(url);
        XPath contextpath = new BaseXPath("/root/a", nav);
        log("Initial Context :: " + contextpath);
        List list = contextpath.selectNodes(document);
        Iterator iter = list.iterator();
        while (iter.hasNext())
        {
            Object context = iter.next();
            assertValueOfXPath("ab", context, "concat( ., /root/b )");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/simple.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("", context, "translate( '', '', '' )");
View Full Code Here

    {
        Navigator nav = getNavigator();
        String url = TESTS_ROOT + "xml/simple.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("234", context, "substring('12345', 1.5, 2.6)");
View Full Code Here

TOP

Related Classes of org.jaxen.XPath

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.