Senthil Rajasekharan wrote:
> I am trying to create a Java class that should
> generate the following Xml on "marshalling".
>
> <ElementA>
>
> <ElementB>stringValue</ElementB>
> <ElementC name="stringName">stringValue</ElementC>
> <ElementD>integerValue</ElementD>
>
> </ElementA>
>
> What is the corresponding Java representation with
> annotations?
>
> I have tried this a few times on my own...but I don't
> understand how to generate ElementC.
You'd need a class.
class ElementC {
@XmlAttribute String name;
@XmlValue String value;
}
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com