[jdom-interest] WBXML encoder/decoder

Gartha Brindoid garthabrindoid at yahoo.com
Thu Jun 20 20:50:01 PDT 2002

I'm a JDOM newbie, so please forgive me if this is a
really stupid question.

I'm interested in creating a WBXML encoder/decoder
with JDOM (yes, i'm aware of the kXML library).  WBXML
is just a binary representation of an XML document--a
trick of mapping tag and attribute names (and some
values) to predefined bytecodes.

So, basically i'll be receiving an input stream
consisting of WBXML bytes, and i'd like to "inflate"
that into a JDOM Document.  Similarly, i'd like to be
able to create a JDOM document and then "deflate" it
into WBXML.  

Someone asked about doing the same thing with dom4j
and the only answer was pretty much "sure, it should
be fairly easy".

Surely something like this is possible with JDOM?

If so, would someone mind giving me a nudge in the
right direction?  I'm assuming I'll need to write some
kind of adapter to sit between the input stream and
the builder?  Do i create a SAX parser and then do
something like "new
SAXBuilder(com.foo.bar.WbxmlParser)"?  Or am I
responsible for creating the actual builder?  And, on
the other end, when i have a JDOM Document, and i want
to output it as WBXML bytes, do I create an outputter
by extending XMLOutputter?

See?  I'm pretty clueless on where to start.  Thanks
heaps for your patience and help!


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

More information about the jdom-interest mailing list