I have an XML document and a schema. It validates fine, but when I try to
switch to data view there's a problem. So I tried "Create Schema" and got
the error:
An error occurred while loading the schema with targetNameSpace
"http://tempuri.org/XMLFile1.xsd" referenced in this document.
Index (zero based) must be greater or equal to zero and less than the size
of the argument list.
I can't find any help on this error, or see any reason why it should
occurring.
I've made this as simple as I can and I just can't see where the problem is
occurring.
Andy D
My XML is:
<?xml version="1.0" encoding="utf-8" ?>
<Names xmlns="http://tempuri.org/XMLFile1.xsd">
<name>Andy</name>
<name>Bob</name>
<name>Charles</name>
<name>Derek</name>
</Names>
my XSD is:
<?xml version="1.0" ?>
<xs:schema id="Names" targetNamespace="http://tempuri.org/XMLFile1.xsd"
xmlns:mstns="http://tempuri.org/XMLFile1.xsd"
xmlns="http://tempuri.org/XMLFile1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-
microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Names" msdata:IsDataSet="true" msdata:Locale="en-
GB" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="name" nillable="true"
type="xs:string"></xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>