Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for transformimg an xsd file into a Data Structure in Java

Status
Not open for further replies.

sergiu75

Programmer
Dec 8, 2007
1
CA
I desperetly need to transform this 2 xsd files into a Data Structure in Java
Please, if someone can help me, I will appreciate

first file

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs=" elementFormDefault="qualified">
<xs:include schemaLocation="GenericMetricsSchema.xsd"/>

<xs:comlexType name="datas_content">
<xs:sequence>
<xs:element name="version" maxOccurs="unbounded">

<xs:comlexType>
<xs:sequence>
<xs:element name="object" maxOccurs="unbounded" type="object_content"/>
</xs:sequence>

<xs:attribute name="name" type="xs:string" use="required"/>

</xs:comlexType>

<xs:key name="objects">
<xs:selector xpath="/datas/version/object"/>
<xs:field xpath="@name"/>
</xs:key>

</xs:element>
</xs:sequence>
</xs:complexType>

<xs:unique name="versions">
<xs:selector xpath="/datas/versions"/>
<xs:field xpath="@name"/>
</xs:unique>

</xs:schema>

second file

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs=" elementFormDefault="qualified">
<xs:include schemaLocation="GenericMetricsSchema.xsd"/>

<xs:comlexType name="datas_content">
<xs:sequence>
<xs:element name="object" maxOccurs="unbounded" type="object_content"/>
</xs:sequence>
</xs:complexType>

<xs:key name="objects">
<xs:selector xpath="/datas/object"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:unique name="versions">
<xs:selector xpath="/datas/versions"/>
<xs:field xpath="@name"/>
</xs:unique>

</xs:schema>
 
You can look into sourceforge project xml-xig if you're java-veteran (because its set up is not done two clicks, far from it.)
Else, some commercial/popular ide's seems to have it as utility - I just don't use them to know more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top