Ryan Shoemaker - JavaSoft East wrote:
> eguy66_at_optonline.net wrote:
>
>>
>> I thought setting the xmlDeclaration property to false might solve
>> things, but it had no effect. Any suggestions?
>>
>
> This sounds like a bug. For one, we now have a portable property
> Marshaller.JAXB_FRAGMENT rather than the RI specific property. I'll
> confirm some details and fix the code...
>
I ran some test code and it looks like Marshaller.JAXB_FRAGMENT takes
precedence over the com.sun.xml.bind.xmlDeclaration RI specific property.
If you use:
m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
it will suppress things as expected. Take a look at the javadoc for the
property though - it does slightly different things depending on what you
are sending the marshalled data to. In your case (ContentHandler), we
suppress the calls to startDocument() and endDocument().
Thanks,
--Ryan