"Andreas Palm" <apa57@hotmail.com> wrote in message
news:d0e0a20b.0409210259.2c96f46e@posting.google.com...
> Hi there,
>
> I do have a dataset which I use to write a XML file with inline
> schema. A second
> application should use a XmlvalidatingReader to read the xml file
> again.
>
> Now I get errors like: The
> '
http://tempuri.org/LicenceFile.xsd:LicenceData' element is not
> declared.
>
> I'm a bit surprised since it is the inline schema and xml that was
> generated by the WriteXml method of the dataset and I didn't change
> anything there. I would have expected that schema and xml data do
> match when they are created by the dataset method. Did I miss
> something ?
>
> below is the xml file with the inline schema:
>
> <?xml version="1.0" standalone="yes"?>
> <LicenceFile xmlns="
http://tempuri.org/LicenceFile.xsd"> > <xs:schema id="LicenceFile"
> targetNamespace="
http://tempuri.org/LicenceFile.xsd" > xmlns:mstns="
http://tempuri.org/LicenceFile.xsd" > xmlns="
http://tempuri.org/LicenceFile.xsd" > xmlns:xs="
http://www.w3.org/2001/XMLSchema" > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> attributeFormDefault="qualified" elementFormDefault="qualified">
> <xs:element name="LicenceFile" msdata:IsDataSet="true">
> <xs:complexType>
> <xs:choice maxOccurs="unbounded">
> <xs:element name="LicenceData">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="X1" type="xs:string" />
> <xs:element name="X2" type="xs:string" />
> <xs:element name="X3" type="xs:string" />
> <xs:element name="X4" type="xs:string" />
> <xs:element name="X5" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> <LicenceData>
> <X1>038XXXXX0B1</X1>
> <X2>69712-XXX-XXXXXX-XXXXX</X2>
> <X3>Microsoft(R) Windows(R) Server 2003, Standard Edition</X3>
> <X4>3790</X4>
> <X5>79XXX60</X5>
> </LicenceData>
> </LicenceFile>