[
Lists Home |
Date Index |
Thread Index
]
> I've been looking into what xml parsing approach to use for
> my open source
> Java GPS Access Library.
>
> Currently I only output XML, so am just building it using
> brute-force Java code
> without using any specific parser/toolkit. The issue becomes
> blurry now that I
> am looking at reading in XML as well (validated by the GPSml schema).
>
> Normally I would say that using SAX might be the best bet,
> since my library is
> already event driven and the paradigms fit nicely.
>
> JDOM is attractive because of it's javatized API, but it's
> not clear to me if
> JDOM reads in the whole document structure or not when you read a
> document, or does it just interact with SAX under the covers
> as you request
> elements that are progressively deeper in the tree?
JDOM builds a tree representing the document in-memory. I don't think you
need that. Go for a SAX2 parser; and go for one with a small footprint. From
this point of view, AElfred is ideal. There's an AElfred2 with David
Brownell maintains on sourceforge; the AElfred version which I embed in
Saxon is a bit behind in bells and whistles (e.g. no validation), but has as
tiny a footprint as you'll get anywhere.
Mike Kay
>
> The thorny issue is that one of the key features of the GPS
> code base is that it
> runs (more or less) unchanged on many platforms, including
> smaller PDA's
> and embedded Java devices (like boards based on the aJile
> Java chip). That
> means that total size of the application (including all jar
> files) is important, and
> even more so, some standard API's (like many java.io classes) are not
> available, which causes problems with SAX/JDOM.
>
> Any advice on how to proceed? Since SAX and JDOM are open
> sourced, I'm
> leaning towards using a stripped down version of these tools
> which specialized
> IO classes added to support the embedded devices.
>
> Thoughts?
>
> Thx!
>
> Andrzej Jan Taramina
> Chaeron Corporation: Enterprise System Solutions
> http://www.chaeron.com
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
|