I'm trying to use the IXMLDOMDocument2 interface (C++) to validate an Xml document against some schema and I'm getting the following error:
Duplicate named <element> : name = '{http://www.site.com/MySchema}envelope'.
I'm struggling to understand what this means - is there a problem with my schema, or is this a problem with the Xml? I've checked both the schema and the Xml and they both hardly even contain the word "envelope" twice!
The Xml:
<id:envelope xmlns:id="http://www.site.com/MySchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.site.com/MySchema MySchema.xsd">
<id/>
<!-- Load of unimportant elements -->
</id:envelope>
The XSD:
<xsd:schema targetNamespace="http://www.site.com/MySchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.site.com/MySchema" elementFormDefault="unqualified">
<xsd:element name="envelope" type="envelopeType">
<!-- etc... -->
</xsd:element>
<xsd:complexType name="envelopeType">
<!-- etc... -->
</xsd:complexType>
<!-- load of other types... -->
</xsd:schema>