In that case it appears that I can not use inline XSD schema to validate my
"Stan Kitsis [MSFT]" <skits@microsoft.com> wrote in message
news:42167ec2$1@news.microsoft.com...
> 1. Your xml has two root elements, which is not allowed.
> 2. You need to move xs:schema inside employee element
>
> <employee>
> <xs:schema....
> ...
> </xs:schema>
> </employee>
>
> --
> Stan Kitsis
> Program Manager, XML Technologies
> Microsoft Corporation
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
>
http://www.microsoft.com/info/cpyright.htm >
> "Edward Diener" <diener_no_spam_ok@ORsoftware.com> wrote in message
> news:exzif3gFFHA.1396@tk2msftngp13.phx.gbl...
>>I could not find an example of an inline XSD schema for an XML document
>>which has no namespaces. Could someone supply one ? When I tried
>>validating my XML with an inline XSD schema, using XmlDocument.Load on a
>>validating reader set to System.Xml.ValidationType.Auto, it failed and I
>>do not know why.
>>
>> My XML is:
>> <?xml version='1.0'?>
>> <xs:schema xmlns:xs='
http://www.w3.org/2001/XMLSchema'>
>> <xs:element name='Employee'>
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name='Name'>
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name='First' type='xs:string' />
>> <xs:element name='Last' type='xs:string' />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>> <xs:element name='Address'>
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name='Street' type='xs:string' />
>> <xs:element name='City' type='xs:string' />
>> <xs:element name='State' type='xs:string' />
>> <xs:element name='Zipcode' type='xs:string' />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>> <xs:element name='Phone' type='xs:string' />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>> </xs:schema>
>> <Employee>
>> <Name>
>> <First>
>> Edward
>> </First>
>> <Last>
>> Diener
>> </Last>
>> </Name>
>> <Address>
>> <Street>
>> Somewhere Street
>> </Street>
>> <City>
>> Some City
>> </City>
>> <State>
>> Georgia
>> </State>
>> <Zipcode>
>> 34567
>> </Zipcode>
>> </Address>
>> <Phone>
>> 4445556666
>> </Phone>
>> </Employee>
>>
>>
>>
>
>