XML implementation in .NET ?

  • Thread starter Thread starter SS
  • Start date Start date
S

SS

Is it possible to validate or cross check a XML from a XSD file? If suppose
the XML format is

<MAIN Attribute1="" Attribute2="" >

<T1 Attribute1="" Attribute2="" />

<T2 Attribute1="" Attribute2="" />

</MAIN >

how can I do it? And if suppose the validation check cracks or fails, how
will I know where is the mismatch? I want to intimate the user that he has
entered a wrong value, or something of the sort. Can it be implemented in
..NET?

Thanks for help.
 
Use XmlValidatingReader - you can provide an event handler that is called if
the document isn't schema-valid.
 
Back
Top