MillScript-XML is an alternative Java XML parsing library with its own custom API. The underlying tokenizer can be configured to permit non-well-formed XML. This library's API provides both an event model and a more conventional token stream model. The authors believe that the token stream is more friendly to applications, easier to use, and helps to minimise object creation and inter-conversion of types with the parser. A SAX2 implementation is provided for compatibility with existing applications.
In particular by making the tokenizer return
ints, we reduce the scope for unsupported token
type creeping in. We have then implemented the visitor pattern for our
Token objects, effectively bringing together the
tokenizing and even style parsers into a common structure.
For an example demonstrating simple use of the library, have a look at the use page.