Hi,
I think you need to look into the EventProducer interface. Basically you implement this interface. You then pass an instance of an object implementing this interface to the Marshaller. With this interface you get to wrap the internal Castor SAX handler in your own and control what gets sent to Castor.
I have some examples but they are quite contrived with other code. If your still having problems getting to grips with it, just shout again! ;-)
Cheers,
Andy.
-----Original Message-----
From: Rajesh Kalluri Kalluri [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2002 14:14
To: [EMAIL PROTECTED]
Subject: [castor-dev] How to use SAX filters with marshal/unmarshal -
repost
Hi All,
I am trying to use castor XML binding in a case where i export some data as XML and at a later stage Import XML into the db.
During export i have to modify my object tree to do some lookups, delete elements etc and marshall as XML.
During import i have to massage the XML file by doing some lookups on another XML file.
I have read on the list that this can be accomplished by either chaining SAX filters to the UnmarshalHandler or implemneting custom FieldHandlers.
My question is can SAX filters be also applied during marsahlling an object graph as XML or only during Unmarshall.
Can some body post some example code to hookup SAX filters to Castor please.
Right now i am modifying the DOM tree by converting either my Object graph or XML file and want to improve performance when dealing with large number of imports and exports.
Any insight is highly appreciated.
Regards
Rajesh Kalluri
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
