I have a set of xsd files for different data types. In the Java world, the best way to create a list of type properties?
eg. with these two files.
file: customer.xsd
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="customer">
<xs:complexType>
<xs:sequence>
<xs:element name="number" type="xs:integer"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
file: order.xsd
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="customer">
<xs:complexType>
<xs:sequence>
<xs:element name="orderid" type="xs:integer"/>
<xs:element name="customer" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I would like to do two things
1. Java application that reads in XSD and then processes (somehow?). Therefore, when you run the program, it can print properties
> java -jar printtypes.jar -f customer.xsd
> number : Integer
> name : String
> address : String
2. some kind of conversion that generates a new file
file: customer.properties
<propertylist>
<prop>
<name> orderid </name>
<type> integer </type>
</prop>
<prop>
<name> customer </name>
<type> string</type>
</prop>
</propertylist>
(1) , java- Java-, JAXB.
, , . - . ArrayList, , .
++-, Java. Google - JAVA/XSD, , , , .