users@jaxb.java.net

Appending processing instructions

From: Kasia Trapszo <kasia_at_trapszo.com>
Date: Wed, 13 Sep 2006 16:12:51 -0400

I know the recommended method is to simply output the instruction to
whatever output stream & disable the com.sun.xml.bind.xmlDeclaration
property on the marshaller, but that doesn't work so well when
outputting to a JAXBSource object.

Any suggestions?

code looks something like..

JAXBSource source = new JAXBSource(marshaller, document);
transfomer.transform(source, new StreamResult(out));

The xsl transformer really does not like this. If I convert to a Dom and
append a processing instruction to that, it works fine, but it seems
like an unnecessary conversion step.