What is TinyXML4J
TinyXML4J is a very small foot print non-validating XML parser and binding API for Java. The entire binary jar file is under 20K. It only supports basic XML element and attribute. It is suitable for Applet applications, embedded applications and PDA applications, which usually have limited memory resources.
How does it work?
Create Java Binding Classes based on the DTDs and extended XMLElement class. Create a Java class with the same name as each element. Create a pair of setter and getter for each attribute . Child element has a getter by index and element counter. Besides these minimum requirements, you can add additional methods and variables to the binding class.
To bind XML to the Java class, simply write three lines of code
Factory f = new Factory();
Order order = (Order) f.populateDocument(xml);//for String
Order order = (Order) f.populateDocument(new File(fileWithPath));//for file
Java Runtime Environemnt 1.0.2+
Microsoft (R) VM for Java, 5.0 Release 220.127.116.1102+