my xsd file

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi
I want to be able to do the following but i am not sure how to do it. As you can see in the ConfigurationFileType there are three elements.
ServerSettingsType and AdministrativeType can appear in any order 0 or 1 times. thats fine.
But my xml file might have 1 or more additional elements at the same level. how do i do this.<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified


<xsd:element name="ConfigurationFile" type="ConfigurationFileType"/>

<xsd:complexType name="ConfigurationFileType
<xsd:all>
<xsd:element name="ServerSettings" type="ServerSettingsType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Administrative" type="AdministrativeType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="*" minOccurs="0" maxOccurs="unbounded"/>
</xsd:all>
</xsd:complexType>

<xsd:complexType name="ServerSettingsType
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="AdministrativeType
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

View the full article
 
Back
Top