Read hierarchy, type and occurence out of XSD-File



i want to read the hierarchies, types and occurences out of a XSD-File. Until now i have only succeded importing the file into an XmlSchemaSet Object, from which i still cannot read the string/int/bool types, neither the max/min occurences or hierarchies.


Example:



<?xml version="1.0" encoding="utf-8"?>
<xs:schema
attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://ift.tt/tphNwY"
>

<xs:simpleType name="ActionType">
<xs:restriction base="xs:string">
<xs:enumeration value="GET"/>
<xs:enumeration value="POST"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="Data">
<xs:complexType>
<xs:all>
<xs:element name="Action" type="ActionType" minOccurs="1" maxOccurs="1" />
<xs:element name="Target" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Parameters" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="include_entities" maxOccurs="0" />
<xs:element name="include_user_entities" maxOccurs="0" />
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>

No comments:

Post a Comment