[XOM-interest] How to get access to XOM ContentHandlers?
Thomas Hicks
hickst at theriver.com
Wed Aug 29 11:57:08 EDT 2007
At 04:03 AM 8/25/2007, Elliotte wrote:
>Thomas Hicks wrote:
>>No reply to my post....but I suppose it's my fault: I didn't
>>phase it as an interrogative. I really meant to ask some questions:
>>1) Is my analysis of the situation incorrect or incomplete?
>>2) Is there some other way to do this? (a workaround)?
>>...[snip]...
>
>I'm a little confused abut exactly what you're trying to do.
Sigh....the problem of language...I always think I'm being sooo clear. :)
I'm trying to integrate the XOM library into existing 3rd party software.
The JDOM example I gave was just to show how the same integration
is done in JDOM. Otherwise, I don't care about JDOM.
The API of the 3rd party software expects an XMLReader containing a
ContentHandler. I need this to be an XOM ContentHandler.
Bottom line question: How to build an XMLReader containing an
XOM ContentHandler (such as nu.xom.NonVerifyingHandler)?
Is there a way to do this?
Extra (not crucial but possibly helpful) Information
----------------------------------------------------------------
-- The 3rd party software API is going to extract the SAX ContentHandler
from the given XMLReader and allow it to handle the events generated
by parsing an internally encapsulated document.
--- JDOM has already been integrated into the 3rd party library because
it allows the user to get an instance of a JDOM Content Handler:
org.jdom.input.SAXHandler sh = new SAXHandler();
XMLReader xrdr = XMLReaderFactory.createXMLReader();
xrdr.setContentHandler(sh);
xrdr.setProperty("http://xml.org/sax/properties/lexical-handler", sh);
3rdPartyClass.exampleAPICall(xrdr);
More information about the XOM-interest
mailing list