Package org.dom4j

Examples of org.dom4j.Element.selectSingleNode()


            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
View Full Code Here


            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
View Full Code Here

            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
        }
View Full Code Here

            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
        }
        {  //test to outputstream
View Full Code Here

            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
        }
        {  //test to outputstream
            assertTrue(test1.delete());
View Full Code Here

            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
        }
        {  //test to outputstream
            assertTrue(test1.delete());
            final ResourceXMLGenerator gen = new ResourceXMLGenerator(test1);
View Full Code Here

            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
            assertEquals("test user", root.selectSingleNode("node/@username").getStringValue());
        }
        {  //test to outputstream
            assertTrue(test1.delete());
            final ResourceXMLGenerator gen = new ResourceXMLGenerator(test1);
            //add a node
View Full Code Here

            assertNotNull(d);
            final Element root = d.getRootElement();
            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
View Full Code Here

            final Element root = d.getRootElement();
            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
View Full Code Here

            assertEquals("project", root.getName());
            assertEquals(1, root.selectNodes("/project/*").size());
            assertEquals(1, root.selectNodes("node").size());
            assertEquals("test1name", root.selectSingleNode("node/@name").getStringValue());
            assertEquals("test1", root.selectSingleNode("node/@hostname").getStringValue());
            assertEquals("a, d", root.selectSingleNode("node/@tags").getStringValue());
            assertEquals("test desc", root.selectSingleNode("node/@description").getStringValue());
            assertEquals("test arch", root.selectSingleNode("node/@osArch").getStringValue());
            assertEquals("test fam", root.selectSingleNode("node/@osFamily").getStringValue());
            assertEquals("test osname", root.selectSingleNode("node/@osName").getStringValue());
            assertEquals("test vers", root.selectSingleNode("node/@osVersion").getStringValue());
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.