cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@managingpartners.com>
Subject Re: Migrating DOM based XML generators
Date Mon, 22 Apr 2002 17:58:39 GMT
On Monday 22 April 2002 01:36 pm, Simon Brooke wrote:
> I have a *lot* of classes which implement this interface.To plug them
> into Cocoon I need to generate SAX events and currently I don't.
> Obviously generating SAX events as the document is being built is going
> to be quicker than building a document tree and then tree-walking it to
> generate the SAX events, so if I decide that Cocoon is the right road
> to go down I've got a lot of rewriting to do. But as a quick fix, does
> someone have a class which implements
> org.apache.cocoon.generation.Generator, and which (in its generate()
> method) walks a DOM tree constructed by something else? It would save
> me a lot of grief.

Look at the
org.apache.cocoon.xml.AbstractSAXFragment
which uses
org.apache.cocoon.xml.dom.DOMBuilder
to easily convert a org.w3c.dom.Node to SAX2 events.
-pete

-- 
peter royal -> proyal@managingpartners.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message