What is Ferris XML

Ferris XML is a project containing classes related to XML Documents, specifically how to easily read simple XML Documents without needing to learn an entire XML-Java mapping tool.



Assume this XML document:


Reading this XML document with NodeAdaptor is simple:

Document document 
        = getDocument(getResource("GetNodeAdaptors.xml"));

NodeAdaptor root 
        = new NodeAdaptor(document);            
NodeAdaptor Root
        = root.getNodeAdaptor("Root");  
NodeAdaptor Names
        = Root.getNodeAdaptor("Names"); 
List NameNodeAdaptors
        = Names.getNodeAdaptors("Name");
NodeAdaptor Rita
        = (NodeAdaptor)NameNodeAdaptors.get(0);         
assertEquals("Name", Rita.getName()); // Tag Name
assertEquals(1, Rita.getType());        // Tag Type
assertEquals("Rita", Rita.getValue()); // Tag Value
assertEquals(0, Rita.getNodeAdaptorCount()); // Tag Child Count