users@jaxb.java.net

Creating implicit lists

From: Osipov, Michael <michael.osipov_at_siemens.com>
Date: Tue, 19 Jan 2010 14:18:37 +0100

Hi folks,

I have an XML structure like this:

<rule className="package.CmKlasse" name="cmklasse">
        <params>
                <param name="cmklasse" />
                <param name="cur" />
        </params>
</rule>

The compiler, of course, turns the nested param element to: Rule.Params#getParam. Well, this structure is not really convenient. I like to keep the wrapper but have something like this: Rule#getParams() which internally maps to the param list.

Is this possible? I am a newbie, just read through the docs but did not understand if this can be done with an jaxb schema annotation.

Thanks
--
Mit freundlichem Gruß / Best regards

Michael Osipov

Siemens AG
Sector Industry, I DT IT LD Bln (Werkstudent)
mailto:michael.osipov_at_siemens.com