You can either inline your schema or reference it in your XML document and
then use the XmlValidatingReader to validate as follows:
XmlDocument doc = new XmlDocument();
XmlTextReader tr = new XmlTextReader("data.xml");
XmlValidatingReader reader = new XmlValidatingReader(tr);
doc.Load(reader);
Thanks,
Mujtaba.
"CK" <jo*****@hotmail.com> wrote in message
news:eK**************@TK2MSFTNGP10.phx.gbl...
I am doing a
Doc.Loadxml(myxml)
and I have an xsd schema that I want to validate the myxml against. How
can I do this. code would help.
Thanks in advance.