Examples of XBeansXPath


Examples of org.apache.xmlbeans.impl.xpath.jaxen.XBeansXPath

        System.out.println("\n ----- test1:   XBeansXPath.selectNodes(xpathStr) Navigator: XmlBookmarks + 1 XmlCursor embeded in the bookmark -----");

        try
        {
            XmlObject doc = XmlObject.Factory.parse(file);
            XPath xpath = new XBeansXPath(xpathStr);
            XmlCursor xc = doc.newCursor();
            List results = xpath.selectNodes(xc);

            Iterator resultIter = results.iterator();

            System.out.println("Document :: " + doc );
            System.out.println("   XPath :: " + xpath );
View Full Code Here

Examples of org.apache.xmlbeans.impl.xpath.jaxen.XBeansXPath

        System.out.println("\n ----- test1:   XBeansXPath.selectNodes(xpathStr) Navigator: XmlBookmarks + 1 XmlCursor embeded in Navigator -----");

        try
        {
            XmlObject doc = XmlObject.Factory.parse(file);
            XPath xpath = new XBeansXPath(xpathStr);
            XmlCursor xc = doc.newCursor();
            List results = xpath.selectNodes(xc);

            Iterator resultIter = results.iterator();

//            System.out.println("Document :: " + doc );
            System.out.println("   XPath :: " + xpath );
View Full Code Here

Examples of org.apache.xmlbeans.impl.xpath.jaxen.XBeansXPath

        System.out.println("\n ----- test2:   XBeansXPath.selectNodes(xpathStr) Navigator: XmlBookmarks + 1 XmlCursor embeded in Navigator -----");

        try
        {
            XmlObject doc = XmlObject.Factory.parse(file);
            XPath xpath = new XBeansXPath(xpathStr);
            XmlCursor docXC = doc.newCursor();

            long start = System.currentTimeMillis();
            int count = 0;

            for (int j = 0; j < 10; j++)
            {
                long start2 = System.currentTimeMillis();
                for (int i = 0; i < 100; i++)
                {
                    XmlCursor speaker = (XmlCursor)xpath.selectSingleNode(docXC);
                    count += (speaker == null ? 0 : 1);
                }
                //System.out.println((j*100) + "                \t" + (System.currentTimeMillis()-start2));
            }

View Full Code Here

Examples of org.apache.xmlbeans.impl.xpath.jaxen.XBeansXPath

        String xpathStr = "//*[contains(name(),'C')]";

        try
        {
            XmlObject doc = XmlObject.Factory.parse(xmlDocStr);
            XPath xpath = new XBeansXPath(xpathStr);
            XmlCursor xc = doc.newCursor();
            List results = xpath.selectNodes(xc);

            Iterator resultIter = results.iterator();

//            System.out.println("Document :: " + doc );
            System.out.println("   XPath :: " + xpath );
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.