I have some problems in writing down the schema of my XML file, that is pretty simple.
As suggested me, I try to put other code (I removed that because I couldn’t undestrand if I was messing up everything or not…):
I cannot figure out where is the problem of my schema:
<?xml version="1.0"
standalone="yes"?>
<ChangeHistory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xs:schema id="ChangeHistory"
xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="ChangeHistory"
msdata:IsDataSet="true"
msdata:MainDataTable="Version"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:element name="Versions">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Version">
<xs:complexType>
<xs:sequence>
<xs:element name="Edits">
<xs:complexType>
<xs:sequence>
<xs:element name="Edit">
<xs:complexType>
<xs:attribute name="Content" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Id" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:complexType>
</xs:element>
</xs:schema>
<Versions>
<Version Id="1.0.5 - Coming next!">
<Edits>
<Edit Content="Bla bla 1" />
<Edit Content="Bla bla bla" />
</Edits>
</Version>
<Version Id="1.0.4 - Coming soon!">
<Edits>
<Edit Content="First edit of the version" />
<Edit Content="Second edit of the version" />
</Edits>
</Version>
</Versions>
</ChangeHistory>
This XML is generated from a .NET DataSet, and I think the problem is inside (so the outside part is correct!) this element:
<xs:schema id="ChangeHistory"
xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
All the attributes of Version and Edit elements are of type xs:string.
Any help would be appreciated, thank you.
Just use this schema, as generated from the Visual Studio 20120 XSD tool: