Phani/SirisChanti - If I understand your question correctly, then you should be using the XmlValidatingReader class to validate the xml document against a specified schema definition. Here is a sample (quick and dirty) snippet that could give you an idea on how to do this - (this code will not compile as-is, you will have to add additional wireups to make it work) XmlTextReader xmlReader = new XmlTextReader (xmlDataFile); XmlValidatingReader validatingReader = new XmlValidatingReader (xmlReader); validatingReader.ValidationEventHandler += new ValidationEventHandler (this.SchemaValidationHandler); validatingReader.Schemas.Add (null, xsdLocation); // this is the location where you will give in your schema definition (XSD...) xmlDocument.Load (validatingReader); The SchemaValidationHandler event will fire whenever the validating reader sees an issue in matching the xml node/value to the corresponding location in the schema definition allowing you to decide if the matching issue (error/warning) is ignorable or if it is fatal. If you should need any additional info, or if this info is not very clear, then do no hesitate to post back. - Chandra Chivukula |