|
XEngine, XML parserA simple easy to use XML parser interface, implemented as a wrapper over the SAX XML Parser in Java 1.4 SDK. Uses the SAX parser and stores the xml in an internal vector format and provides an API for reading tag values like a DOM parser. The API uses simple Vectors for elements and Strings for all values. It does mot provide any special features except a simple interface to quickly get values without the complexities of other parsers which pack in lot of advanced features which may make the API complex for quick simple parsing. XEngine is a single java source file that can be easily added to any Java 1.4 based project. View XEngine.java
View Test.java - shows how to use XEngine Download xengine.zip
Main API boolean parseFile(String filename) String getElementValue(String tag) String getElementValue(Vector element) String getElementValue(Vector element, String tag) String getElementAttr(Vector element, String type) int getElementCount(String tag) int getElementCount(Vector element, String tag) Vector getElement(String tag) Vector getElement(String tag, int index) Vector getElement(Vector element, String tag) Vector getElement(Vector element, String tag, int index) Vector getElement(String tag, String type) Vector getElements(String tag) Vector getElements(Vector element, String tag) Vector getElementType(String tag, String type, String value) Vector getElementType(Vector element, String tag, Utility API void setDebug(boolean flag) void printElement(Vector element) Originally written circa 2001-02 for paperplane project.
|
| Friday, 02-Apr-2004 10:41:02 PST | kishan at hackorama dot com |

