XML document validation against XSD schema

G

Guest

Hi,

I was validation the XML document by using the XmlValidationReader object
and everything was OK.

As I was notified by VS that this class is obsolete, I changed the code and
used XmlReader with the XmlReaderSettings class.

My question is, why I have to set Schemas.Add(...,"MyDoc.xsd"), if the link
to the XSD document is inside the XML document
xsi:noNamespaceSchemaLocation="MyDoc.xsd" .

Is tehre any other way?

Thanks,
Lubomir
 
G

Guest

Hi,

I found solution in the mentime: I have to set this flag:

settings.ValidationFlags = XmlShcemaValidationFlags.ProcessSchemaLocation;

from now the XSD shema is located accroding the address in the XML document.

Regards,

Lubomir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top