The Tiny API for Markup (TAM) provides a very small interface for parsing XML and similar documents, targeted at Java 2 Micro Edition (J2ME).

See:
          Description

Packages
com.simonstl.midp.tam The Tiny API for Markup, a SAX-like interface for parsers.
com.simonstl.midp.xml A J2ME implementation of the Tiny API for Markup.

 

The Tiny API for Markup (TAM) provides a very small interface for parsing XML and similar documents, targeted at Java 2 Micro Edition (J2ME). TAM is designed to report pretty much everything the parser encounters, leaving it to applications to do some work (notably DTD interpretation) if they need it.

TAM is based on a subset of SAX2, which is then slightly expanded. TAM is not a proper drop-in replacement for SAX - it uses similar method calls, and a similar approach, but it's been reduced to meet the needs of even smaller projects, and expanded slightly to reflect that TAM parsers are not required to process the DTD. It reports element and attribute names as prefixes and local names, because J2ME includes no StringTokenizer class. (My distaste for QNames had a role as well.)

TAM is deliberately small and is not intended to be extensible. It should be possible for applications to use the information provided here to extend its functionality toward complete support for XML 1.0, but such work is left as an exercise for the application. In particular, TAM leaves processing of the DOCTYPE declaration, and entities beyond those built into XML 1.0 to the application.

CDATA section and comment support is provided per the SAX2 ext lexical handler.

The TAM foundation (com.simonstl.midp.tam) is in the public domain, while the parser classes (com.simonstl.midp.xml) are licensed under the Mozilla Public License.