Hi All,
I have the following xml document (see below) and am trying to come up with the xsd schema for it.
XML document:
<root>
<scenario>
<name>TEST1</name>
<params>
<first_name>Mike</first_name>
<last_name>Smith</last_name>
<job>Tester</job>
</params>
</scenario>
<scenario>
<name>TEST2</name>
<params>
<item>Test item</item>
<date>03/10/2010</item>
</params>
</scenario>
<scenario>
<name>TEST3</name>
</scenario>
</root>
Partial XSD schema (as far as I can get):
<xs:element name="IAUTO">
<xs:complexType>
<xs:sequence>
<xs:element name="SCENARIO" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="NAME" type="xs:string"/>
???<xs:element name="PARAMS">
???</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
The problem I'm having is with scenario.params - the structure of params is different for every scenario.
Say there are 100 or so different scenarios and each scenario can have 0-20 parameters...
My goal here is to do validation, to make sure TEST1 scenario (for example) has correct params in the xml file. Also, xml document structure is not set in stone...
Thanks for any help / suggestions.
-Pavel