aspose file tools
The moose likes XML and Related Technologies and the fly likes Castor Marshaller and SAX Content Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Castor Marshaller and SAX Content Handler" Watch "Castor Marshaller and SAX Content Handler" New topic
Author

Castor Marshaller and SAX Content Handler

Greg Charles
Bartender

Joined: Oct 01, 2001
Posts: 2550
    
  10

The Castor Marshaller class is used to map a Java object structure into an XML document. However, it can take an org.xml.sax.ContentHandler either in its contructor, or in its marshal method. My question is, what does this ContentHandler do? ContentHandlers process events generated from parsing an XML document. How are they relevant to creating the document?

I'm interested because we are using Castor to create XML messages based on an object structure. However the objects structures are becoming too big to store whole in core memory. We are looking into a way we can read objects and output XML in a streaming way. Combining Castor Marshalling with SAX seems like a good approach, but I just can't figure out how it would work.
[ June 08, 2006: Message edited by: Greg Charles ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Castor Marshaller and SAX Content Handler
 
Similar Threads
what is SAX (event-based) parsing ?
DOM or SAX
Appending elements to XML dynamically using SAX parser
Writing large chunk of data in XML
Can we generate a XML from XSD using SAX