sorry let me clearify my question,
i'm looking for a java API that will convert a XML Schema (XSD) document
from a textual representation to a tree representation that's stored in a
tree structured object. for example if i have the following XSD:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.books.org"
xmlns="http://www.books.org"
elementFormDefault="qualified">
<xsd:element name="bookstore">
<xsd:complexType>
<xsd:squence>
<xsd:element ref="novel"/>
<xsd:element ref="journal"/>
</xsd:squence>
</xsd:complexType>
</xsd:element>
<xsd:element name="novel">
<xsd:complexType>
<xsd:squence>
<xsd:element ref="exemplar"/>
</xsd:squence>
</xsd:complexType>
</xsd:element>
<xsd:element name="journal">
<xsd:complexType>
<xsd:squence>
<xsd:element ref="exemplar"/>
</xsd:squence>
</xsd:complexType>
</xsd:element>
<xsd:element name="exemplar">
<xsd:complexType>
<xsd:squence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="author" type="xsd:string"/>
</xsd:squence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
this will convert to a tree similar to the one pictured here:
http://tinyurl.com/mt9t
of course there's no way to capture every detail of a XSD into a tree, but
that's not what i'm looking for.
alternatively, could you point to a some good Java XML parsing tutorials.
thanks,
fu bo