You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mitchell Christensen <mc...@redknife.com> on 2001/11/21 04:40:18 UTC

Inserting Attributes

Hi,

I am writing a generator which parses an XML data stream (InputSource).  I
want to add attributes to ONE of the elements that will come from that data
stream.

My thinking was that I could call
[MySaxParser].setContentHandler(this.contentHandler) to pass through the SAX
events, however, this would preclude me from inserting the new attributes.

Does anyone have an idea how to do this?  I suppose that I could subclass
org.xml.sax.helpers.DefaultHandler and implement every method to call the
appropriate this.contentHandler method, inserting my new attributed prior to
the call.  But this doesn't sound right.  There must be an easier way.

Any pointers?

Thanks in advance.
-Mitch

--------------------------
Mitch Christensen
Principal Architect
Redknife, Inc.
3095 Independence Dr.
Livermore, CA  94550


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>