This does seem to be coming up a lot. Your solution is one way of doing this; another is just setting the encoding and output stream directly on the marshalling context and then calling the IMarshallable.marshal() on the root object (rather than going through the marshalDocument() methods) followed by the marshalling context endDocument() method. I'll expose a method that does this directly in the next release, just to make it more obvious.

 - Dennis

Michael Kurz wrote:

Hello,

Is there a simple way to tell JiBX to omit the xml declaration on marshalling objects? Maybe I do not see the wood for the trees but the only possibility I found was to write a custom XMLWriter with an empty writeXMLDecl method. My solution is working fine but I want to know if there is a (even) simpler solution.

regards,
Michael Kurz



------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to