private static XmlElement GetElement(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); return doc.DocumentElement; }
XmlReader xsd = new XmlTextReader(XsdPath); XmlSchemaSet schema = new XmlSchemaSet(); schema.Add(null, xsd); XmlReaderSettings xmlReadeSettings = new XmlReaderSettings(); xmlReadeSettings.ValidationType = ValidationType.Schema; xmlReadeSettings.Schemas.Add(schema); xmlReadeSettings.ValidationEventHandler += new ValidationEventHandler(ValidationHandler); XmlTextReader xmlTextReader = new XmlTextReader(xmlPath); XmlReader xmlReader = XmlReader.Create(xmlTextReader, xmlReadeSettings);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)