Ernst, Matthias wrote:
>>>From the URL you cite:
>
> "
> At the first glance the second Point.class parameter may look redundant,
> but it's actually necessary to determine if the marshaller will produce
> (infamous) @xsi:type. In this example, both the class and the instance
> are Point, so you won't see @xsi:type. But if they are different, you'll
> see it.
> "
>
> So
>
> marshaller.marshal(
> new JAXBElement(
> new QName("","rootTag"),
> Object.class,
> new Point(3,5)
> )
> );
>
> should produce
>
> <rootTag xsi:type="point" x="3" y="5"/>
Yep.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com