Package org.jdom.xpath

Examples of org.jdom.xpath.XPath.newInstance()


        // parse the metadata file
        XPath xPath = XPath.newInstance( "//metadata/versioning" );
        Element rootElement = document.getRootElement();

        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3-SNAPSHOT", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertTrue( el.getValue().equals( "20070315032817" ) );
View Full Code Here


        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3-SNAPSHOT", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertTrue( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes( versioning );

        boolean found = false;
View Full Code Here

        assertEquals( "2.3-SNAPSHOT", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertTrue( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes( versioning );

        boolean found = false;
        for ( Iterator iter = nodes.iterator(); iter.hasNext(); )
        {
            el = (Element) iter.next();
View Full Code Here

        // parse the metadata file
        XPath xPath = XPath.newInstance( "//metadata/versioning" );
        Element rootElement = document.getRootElement();

        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );
View Full Code Here

        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes( rootElement );

        boolean found = false;
View Full Code Here

        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes( rootElement );

        boolean found = false;
        for ( Iterator iter = nodes.iterator(); iter.hasNext(); )
        {
            el = (Element) iter.next();
View Full Code Here

        // parse the metadata file
        XPath xPath = XPath.newInstance( "//metadata/versioning" );
        Element rootElement = document.getRootElement();
              
        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );
View Full Code Here

              
        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes(
            rootElement );
View Full Code Here

        assertEquals( "2.3", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070315032817" ) );

        List nodes = xPath.newInstance( "./versions" ).selectNodes(
            rootElement );

        boolean found = false;
        for ( Iterator iter = nodes.iterator(); iter.hasNext(); )
        {
View Full Code Here

        // parse the metadata file
        XPath xPath = XPath.newInstance( "//metadata/versioning" );
        Element rootElement = document.getRootElement();

        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.0.4-SNAPSHOT", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertFalse( el.getValue().equals( "20070427033345" ) );
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.