xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arkin <ar...@exoffice.com>
Subject Re: Serializing a DOM
Date Thu, 25 May 2000 20:30:43 GMT
Are you just looking for a DOM -> SAX convertor?

XMLSerializer/HTMLSerializer/BaseMarkupSerializers are implementation
classes for the purpose of producing a document from DOM or SAX, not for
converting from one to the other. You can implement a serializer by
implementing Serializer for that purpose, but need not extend any of the
above.

arkin


Dennis Thrysoe - netnord wrote:
> 
> Hi,
> 
> I asked a couple of weeks ago how I could make a DOM into a series of SAX
> calls, and it was suggested to overwrite HTMLSerializer, as XMLSerializer is
> final.
> 
> But HTMLSerializer's implementation of ContentHandler (through
> BaseMarkupSerializer) lacks the throws clauses, which in turn makes it
> impossible to throw SAXExceptions from the ContentHandler methods on
> descendents of HTMLSerializer.
> 
> I was wondering what the reason is that XMLSerializer was made final. It
> seems appropriate enough for me to sub-class it.
> 
> I suggest that BaseMarkupSerializer is made able to throw SAXExceptions -
> thus giving future MarkupSerializers as such the ability to indicate that
> they are choking.
> 
> I also suggest that a DOMSerializer be made and included with Xerces. If it
> would be appropriate, I'd be glad to (help) implement it. I simply believe
> that this is a much needed and missed feature. (Caching DOMs and having them
> fake SAX calls).
> 
> Let me know what you think.
> 
> -dennis
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org

-- 
----------------------------------------------------------------------
Assaf Arkin                                           www.exoffice.com
CTO, Exoffice Technologies, Inc.                        www.exolab.org

Mime
View raw message