[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

ANN: Tiny API for Markup, Parser

  • To: xml-dev@l...
  • Subject: ANN: Tiny API for Markup, Parser
  • From: "Simon St.Laurent" <simonstl@s...>
  • Date: Tue, 20 Aug 2002 11:01:09 -0400

tiny html parser
I've released a first version of the Tiny API for Markup (TAM) and a
Java 2 Micro Edition parser that supports it.  I originally started
writing this as part of a project for supporting a very small subset of
SVG on the Palm, but it acquired a life of its own.

http://simonstl.com/projects/tam/

The API is based loosely on SAX2, though the looseness has increased
over time.  TAM both subsets and supersets SAX2's core ContentHandler
interface, and changes from (uri, localName, qName) to (uri, localName,
prefix).  SAX2 developers should find it familiar, but direct
compatibility with SAX2 was definitely not a goal.

This parser is _not_ XML 1.0-compliant, primarily because it doesn't
support DOCTYPE processing at all.  J2ME is a very constrictive
environment, so I've made some reductions and passed responsibility from
the parser to the application.  The TAM API provides an event that
reports the entire DOCTYPE declaration to the application, which is then
responsible for any DOCTYPE processing that may be necessary.  TAM will
resolve simple entities if the application registers them with the
parser, but does not handle entities which contain markup - that's a job
for the application.

This parser does support namespaces, and namespace declarations are
reported as attributes.  The startPrefix/endPrefix methods of SAX2 are
not supported by TAM.

The current version also does very little character checking of markup,
and while it normalizes line-ends, it doesn't do attribute white-space
normalization.  These features (and DOCTYPE processing) will appear in a
later version of the parser which supports more of XML 1.0 and also
Markup Object Events (MOE):

http://moe.sourceforge.net

The TAM API interface and TAMException class are in the public domain,
while the parser is licensed under the Mozilla Public License, version
1.1.  While this code is written for J2ME, it also works in J2SE and
should be fine in any Java 2 environment.



-------------
Simon St.Laurent - SSL is my TLA
http://simonstl.com may be my URI
http://monasticxml.org may be my ascetic URI
urn:oid:1.3.6.1.4.1.6320 is another possibility altogether

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.