users@jaxb.java.net

Re: do not marshall standalone="yes"

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Mon, 18 Aug 2003 14:37:14 -0400

Christoph Brunner wrote:

> Hi,
>
> how can i force the marshaller not to marshall
> 'standalone="yes"' in the first <"?xml .../> tag?
>

There isn't an easy way to do this via the JAXB API's, but you should
be able to extend org.xml.sax.helpers.XMLFilterImpl and customize the
startDocument() API to emit the desired "<?xml ...?>" tag.

Search the archives[1] for "How to marshal XML fragments with JAXB"
for an example of how this might work...

--Ryan

[1] https://jaxb.dev.java.net/servlets/SearchList?listName=users



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net