users@jaxb.java.net

Re: marshal without envelope tag

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Tue, 30 Dec 2008 16:40:15 +0100

Setting the JAXB_FRAGMENT property to true lets you marshal repeatedly, but
the
initial
   <?xml version="..." encodeing="..."?>
will only be generated once.

This will indeed let you marshal individual objects, one after the other.

But no object can be marshalled without its envelopping tag. (Where
would the object's attributes go?)

-W



On Tue, Dec 23, 2008 at 5:10 PM, Damon Goodyear
<damongoodyear_at_hotmail.com>wrote:

> Then I'm a bit boogered to know. as they say up north.
>
> Damon Goodyear
>
>
>
>
> > Date: Tue, 23 Dec 2008 16:49:35 +0100
> > From: guf_at_kajak.org.pl
> > To: users_at_jaxb.dev.java.net
> > Subject: RE: marshal without envelope tag
>
> >
> > Damon Goodyear :
> > > I believe if you set JAXB_FRAGMENT to Boolean.TRUE then you can
> marshall
> > > only the object.
> >
> > I have tried:
> >
> > marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
> >
> > just before invoking
> > marshaller.marshal( myObject, outputStream );
> >
> > But it doesn't help - I get the same exception. Maybe I do sth wrong?
> >
> > -tt.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
>