XSD schema saying:
Line: 2, Position: 2 "Could not find schema information for the element 'ArrayOfClient'."
Line: 3, Position: 4 "Could not find schema information for the element 'Client'."
Line: 3, Position: 11 "Could not find schema information for the attribute 'ID'."
Line: 3, Position: 27 "Could not find schema information for the attribute 'email'."
XSD schema:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XMLSchema1"
targetNamespace="http://tempuri.org/XMLSchema1.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema1.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:simpleType name="stringtype">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:complexType name="clientType">
<xs:attribute name="ID" type="stringtype" use="required"/>
<xs:attribute name="email" type="stringtype" use="required"/>
</xs:complexType>
<xs:complexType name="ClientsType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Client" type="clientType" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfClient" type="ClientsType"/>
</xs:schema>
XML file:
<?xml version="1.0"?>
<ArrayOfClient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Client ID="00000000" email="user@mail.com" />
</ArrayOfClient>
- This doesn't work, the xml file is generated with XmlSerializer from .NET C#.
- Is there a way I can impose a verification for the ID attribute so it will always be a number of 10 digits and email... ?
Edit: Further information on the way I build the XML file here.