Package name.pehl.totoe.xml.client

Examples of name.pehl.totoe.xml.client.Document


    }


    public void testSelectValue()
    {
        Document document = parse();
        String units = document.selectValue("//bttf:power/@unit");
        assertUnitValue(units);
    }
View Full Code Here


*/
public class XmlParserDtdTest extends AbstractXmlParserTest
{
    public void testParse()
    {
        Document document = parse();
        assertDocument(document);
        assertDocumentType(document, document.getDocumentType());
        assertRootElement(document, document.getRoot());
        assertIdAttribute(document, document.getRoot(), document.getRoot().getAttribute(ID_ATTRIBUTE));
    }
View Full Code Here

    }


    public void testSelectNodes()
    {
        Document document = parse();
        List<Node> functions = document.selectNodes("//functions");
        assertFunctionsNodes(functions);

        Element root = document.getRoot();
        functions = root.selectNodes("functions");
        assertFunctionsNodes(functions);
    }
View Full Code Here

    }


    public void testSelectNode()
    {
        Document document = parse();
        Node functions = document.selectNode("//functions");
        assertFunctionsNode(functions);

        Element root = document.getRoot();
        functions = root.selectNode("functions");
        assertFunctionsNode(functions);
    }
View Full Code Here

    }


    public void testSelectDescriptionText()
    {
        Document document = parse();
        Node description = document.selectNode("//description/text()");
        assertDescriptionText(description);
    }
View Full Code Here

    }


    public void testSelectValues()
    {
        Document document = parse();
        String[] units = document.selectValues("//@unit");
        assertNotNull(units);
        assertEquals(UNITS_SIZE, units.length);
        for (int i = 0; i < UNITS_SIZE; i++)
        {
            assertEquals(UNITS[i], units[i]);
View Full Code Here

    }


    public void testSelectValue()
    {
        Document document = parse();
        String units = document.selectValue("//power/@unit");
        assertUnitValue(units);
    }
View Full Code Here


    public void testParseWithNamespacesAsMap()
    {
        String xml = XmlParserResources.INSTANCE.swissArmyKnifeDns().getText();
        Document document = new XmlParser().parse(xml, NAMESPACES_MAP);
        assertDocument(document);
        assertRootElement(document, document.getRoot());
        assertIdAttribute(document, document.getRoot(), document.getRoot().getAttribute(ID_ATTRIBUTE));
    }
View Full Code Here

    }


    public void testParseWithNamespacesAsString()
    {
        Document document = parse();
        assertDocument(document);
        assertRootElement(document, document.getRoot());
        assertIdAttribute(document, document.getRoot(), document.getRoot().getAttribute(ID_ATTRIBUTE));
    }
View Full Code Here

    }


    public void testSelectNodes()
    {
        Document document = parse();
        List<Node> functions = document.selectNodes("//dns:functions");
        assertFunctionsNodes(functions);

        Element root = document.getRoot();
        functions = root.selectNodes("dns:functions");
        assertFunctionsNodes(functions);
    }
View Full Code Here

TOP

Related Classes of name.pehl.totoe.xml.client.Document

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.