T
The Owner
Hi,
I'm looking for a way to define a schema for an XML file with the
following content:
<root_record>
<record>
...
</record>
<record>
...
</record>
</root_record>
A schema definition along the following lines does not work:
<xs:element name="root_record">
<xs:complexType>
<xs:sequence>
<xs:element name="record" maxOccurs="unbounded">
<xs:complexType>
...
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
with an xml file containing:
<root_record>
<record>The first</record>
<record>The second</record>
...
</root_record>
The online xml/xsd validators tell me <record> (of <record>The
second</record>) may not follow </record> (of <record>The first</record>).
So is there a good way to get what I want (an xml file containing (as
xml elements the values of) the contents of a selection of columns of
records from a database table and a correct accompanying schema file)?
Thanks once again for any usable answer!
I'm looking for a way to define a schema for an XML file with the
following content:
<root_record>
<record>
...
</record>
<record>
...
</record>
</root_record>
A schema definition along the following lines does not work:
<xs:element name="root_record">
<xs:complexType>
<xs:sequence>
<xs:element name="record" maxOccurs="unbounded">
<xs:complexType>
...
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
with an xml file containing:
<root_record>
<record>The first</record>
<record>The second</record>
...
</root_record>
The online xml/xsd validators tell me <record> (of <record>The
second</record>) may not follow </record> (of <record>The first</record>).
So is there a good way to get what I want (an xml file containing (as
xml elements the values of) the contents of a selection of columns of
records from a database table and a correct accompanying schema file)?
Thanks once again for any usable answer!