Hello,
I have Object unashamed from XML. I would like to insert part of this
object in another XML document. I'm using Cocoon Transformer for this. In
startElement then I detect element which I would like replace I would like
to write something like this:
Marshaller m = jc.createMarshaller();
m.marshal(myElem, contentHandler);
However this method try to marshal it as whole document with:
<?xml version="1.0" encoding="UTF-8" ?>
This probably case problems for next Transformer.
I have this problem in Cocoon and with SAX. I found simple solution by
palcing another ContentHandler which works as a filter, but there should be
some general solution to marshal JAXB objects as XML fragments, not whole
documents. However I can't found it.
Thanks for any help
Arek Stryjski