Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] SAXConverter and DOMConverter

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: John Cowan <jcowan AT reutershealth.com>, xom-interest AT lists.ibiblio.org (Xom Interest)
  • Subject: Re: [XOM-interest] SAXConverter and DOMConverter
  • Date: Fri, 17 Jan 2003 21:22:13 -0500

At 1:17 PM -0400 9/19/02, John Cowan wrote:

Continuing to clean out my Inbox:

With just a few more methods, it would be easy to make SAXConverter implement
org.xml.sax.XMLReader, which would make it much more valuable in large
programs where you may want to provide an existing component with SAX events.

I think I'm going to reject this one. The hacks required to make the parse() methods work are too ugly and inobvious. Plus, they mean you couldn't really use this class as a drop-in replacement for an XMLReader. ContentHandler is where the main action is, and that's well supported.

DOMConverter should really be part of Builder; this would simplify the
architecture. However, it would also require carrying around the
org.xml.dom interfaces with XOM all the time, which might be thought too expensive.

Half of it could be, but the other half (XOM --> DOM) doesn't really fit. I want to keep the Builder API smaller and hide all the DOM classes from people who don't need them. They're not hard to find if you do.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+



  • Re: [XOM-interest] SAXConverter and DOMConverter, Elliotte Rusty Harold, 01/17/2003

Archive powered by MHonArc 2.6.24.

Top of Page