Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] How to create JDOM from SAX events

Michael Lipp

2004-02-17

Replies:

Hi,

I have a SAX event stream and want to convert this to JDOM. The
SAXBuilder seems to accept anything except (interestingly) SAXEvents.

How should I solve the problem? I see a way to derive a new class from
SAXBuilder that creates the ContentHandler and returns it so that I can
send my SAX events to it. But there must be a simpler way than deriving
a new class, mustn't it?

Or I can create a TransformerHandler (JAXP) with SAX as source and a
JDOMResult. It is just that I am always a bit hesitant to use an
"identity transformer" as I am never sure about the performance...

Regards,

  Michael

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.