xsomを使用してxsdの最大深度を取得する方法。
例:xsdの各複合型の下の要素の総数?
また、複合型がその複合型の下にある場合は、その下の要素と属性の数...... dom \ xsom\jaxbを使用します
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="root" type="root">
<xs:annotation>
<xs:documentation>
Comment describing your root element
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="root">
<xs:sequence>
<xs:element name="element_count" type="xs:string"></xs:element>
<xs:element name="employee" type="employee" maxOccurs="unbounded" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="employee">
<xs:sequence>
<xs:element name="name" type="xs:string"></xs:element>
<xs:element name="ID" type="xs:string"></xs:element>
<xs:element name="Addresses" type="addresses" maxOccurs="1" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addresses">
<xs:sequence>
<xs:element name="address" type="address" maxOccurs="unbounded" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="address">
<xs:sequence>
<xs:element name="line1" type="xs:string"></xs:element>
<xs:element name="line2" type="xs:string"></xs:element>
<xs:element name="city" type="xs:string"></xs:element>
<xs:element name="type" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>