nested type in xsd with som(c #)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
hello.<br/>
<br/>
I have a block of an xml(xsd) that i must process with SOM for extract metadata for generate some classes and functions.<br/>
can you help me to create a simple class from this complex type ? the bigger problem are how i can face nested "complex types" or the nested "choice"?<br/>
<br/>
Can you create a simple class example from the schema with members vars and types from the xsd ?<br/>
<br/>
thanks and sorry for my english.<br/>
By

<pre> <xs:element substitutionGroup="ex:Entity" name="IfcRepresentation" nillable="true" type="ifc:IfcRepresentation </xs:element>
<xs:complexType name="IfcRepresentation
<xs:complexContent>
<xs:extension base="ex:Entity
<xs:sequence>
<xs:element name="ContextOfItems
<xs:complexType>
<xs:choice>
<xs:element ref="ifc:IfcRepresentationContext </xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="RepresentationIdentifier" minOccurs="0" type="ifc:IfcLabel" nillable="true </xs:element>
<xs:element name="RepresentationType" minOccurs="0" type="ifc:IfcLabel" nillable="true </xs:element>
<xs:element name="Items
<xs:complexType>
<xs:sequence>
<xs:element ref="ifc:IfcRepresentationItem" maxOccurs="unbounded </xs:element>
</xs:sequence>
<xs:attribute ref="ex:itemType" fixed="ifc:IfcRepresentationItem </xs:attribute>
<xs:attribute ref="ex:cType" fixed="set </xs:attribute>
<xs:attribute use="optional" ref="ex:arraySize </xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>[/code]

<br/>


View the full article
 
Back
Top