cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xasima <xas...@gmail.com>
Subject JAXB in Cocoon 3 Pipeline
Date Sat, 23 Jan 2010 16:40:06 GMT
Hello. I need to use JAXB marshalling as a (SAX-based) generator in cocoon 3
pipeline.
Smth like this....

---------
// Prepare marshaler
JAXBContext context = JAXBContext.newInstance(....);
Marshaller marshaler = context.createMarshaller();
marshaler.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaler.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);

// Marshaller can output SAX to ContentHandler
ContentHandler handler = ....
marshaler.marshal(object, handler);

Pipeline<SAXPipelineComponent> pipe = new
NonCachingPipeline<SAXPipelineComponent>();
...
---------
How to perform  this  ?

Thanks.




-- 
Best regards,
    ~ Xasima ~



-- 
Best regards,
    ~ Xasima ~

Mime
View raw message