Link to home
Create AccountLog in
Avatar of meow00
meow00

asked on

How do I create a java map from xsd

Hi experts,

I am trying to use xsd to create java class. For example I have class A as followings:

----------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.xxx.com/AAA/entities"
    targetNamespace="http://www.xxx.com/AAA/entities" elementFormDefault="qualified">

    <xs:element name="classA">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="namer" />
                <xs:element ref="value />
                <xs:element ref="myMap" type="xs:string" maxOccurs="unbounded" /> ---> line 00
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

---------------------------------------------------
 How do I modify line 00 so that I can have a hash map in my class? Thanks!


SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.