Xsl To Java

"\Program Files\Java\jdk1.6.0\bin\xjc.exe" RapidMo_Search.xsd

Against: -

<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="Postcode" type="xs:string"/>
<xs:element name="PreviousName" type="xs:string"/>
<xs:element name="RegisteredNo" type="xs:string"/>
<xs:element name="TradingStatus" type="xs:string"/>
<xs:element name="UltimateParent" type="xs:string"/>
<xs:element name="Url" type="xs:string"/>
<xs:element name="Country" type="xs:string"/>
<xs:element name="COID" type="xs:integer"/>
<xs:element name="Address1" type="xs:string"/>
<xs:element name="Address2" type="xs:string"/>
<xs:element name="Address3" type="xs:string"/>
<xs:element name="Address4" type="xs:string"/>
<xs:element name="Address5" type="xs:string"/>

<xs:element name="Activity" type="xs:string"/>

<xs:element name="Address">
<xs:complexType>
<xs:sequence>
<xs:element ref="TradeOrReg" />
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="Company">
<xs:complexType>
<xs:sequence>
<xs:element ref="General" />
<xs:element ref="Ownership" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="General">
<xs:complexType>
<xs:choice>
<xs:element ref="Activity" />
<xs:element ref="Address" />
<xs:element ref="COID" />
<xs:element ref="Name" />
<xs:element ref="NameChange" />
<xs:element ref="RegisteredNo" />
<xs:element ref="TradingStatus" />
<xs:element ref="Url" />
</xs:choice>
</xs:complexType>
</xs:element>

<xs:element name="Name" type="xs:string"/>

<xs:element name="NameChange">
<xs:complexType>
<xs:sequence>
<xs:element ref="PreviousName" />
</xs:sequence>
<xs:attribute name="rank" type="xs:NMTOKEN" use="required" fixed="1" />
</xs:complexType>
</xs:element>

<xs:element name="Ownership">
<xs:complexType>
<xs:sequence>
<xs:element ref="UltimateParent" />
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="Results">
<xs:complexType>
<xs:sequence>
<xs:element ref="Company" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TradeOrReg">
<xs:complexType>
<xs:choice>
<xs:element ref="Address1" />
<xs:element ref="Address2" />
<xs:element ref="Address3" />
<xs:element ref="Address4" />
<xs:element ref="Address5" />
<xs:element ref="Country" />
<xs:element ref="Postcode" />
</xs:choice>
</xs:complexType>
</xs:element>

</xs:schema>

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.