users@jaxb.java.net

Re: is there an XSD type that maps to a java dictionary, hashTable, or Properties class ?

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Tue, 23 Aug 2011 09:50:05 +0200

The JAXB spec says that, for instance, a Map<String,Integer> corresponds to

<xs:complexType>
    <xs:sequence>
        <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="key" type="xs:string" minOccurs="0"/>
                    <xs:element name="value" type="xs:int" minOccurs="0"/>
                </xs:sequence>
               </xs:complexType>
           </xs:element>
       </xs:sequence>
</xs:complexType>

The mapping of Map can be customized using the @XmlJavaTypeAdapter
annotation.

-W


On 23 August 2011 01:10, Andy Davidson <andy_davidson_at_apple.com> wrote:

> thanks
>
> Andy
>