How to read XSD file

Hi all,

I want to read XML Schema (XSD) files in my application. But dont know any API for this.

For ex:

<xs:schema xmlns:sswfm="http://www.sumasoft.com/XMLSchema/WFM" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sumasoft.com/XMLSchema/WFM" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="Bounds" type="sswfm:BoundsType"/>

<xs:complexType name="BoundsType">

<xs:sequence>

<xs:element name="PositionX" type="xs:integer" default="0"/>

<xs:element name="PositionY" type="xs:integer" default="0"/>

<xs:element name="Width" type="xs:integer" default="20"/>

<xs:element name="Height" type="xs:integer" default="10"/>

</xs:sequence>

</xs:complexType>

</xs:schema>

in this XSD i need to read all the elements like this-

PositionX - 0

PositionY - 0

Width- 20

Height- 10

My XSD is much more complex than this. It may contains Enumerations, minlength, maxLength.

How can i read like this?

Any help is appreciable.

[1666 byte] By [RavindraKshirsagara] at [2007-10-2 5:28:50]
# 1
An XSD file is just an XML file. So use your favorite XML parser/XPATH/XQuery API against it.
ydavisa at 2007-7-16 1:30:28 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Thanks for reply.I want java API which reads the XSD files. I have to read this XSD and use its elements in the my Java application.
RavindraKshirsagara at 2007-7-16 1:30:28 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Then you need a Java API that can read XML files. Rusty's book is pretty good at the various ways to handle XML with Java: http://www.cafeconleche.org/books/xmljava/
DrClapa at 2007-7-16 1:30:28 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
I have the same problem ... I'm not able to read an .xsd file and load SimpleType and ComplexType .Can you help me ?Thank you very much .Marco
marcopk84a at 2007-7-16 1:30:28 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...