How do you load XML document and perform validation of the
document?
Answer Posted / bilal hanbali
1- XmlTextReader:We will use it just to load the XML
Document we want to Validate using Class Constructor which
take the file name as parameter
XmlTextReader xReader = new XmlTextReader(string
url_or_FilePath);
2- XmlSchema Class:Contains the definition of a schema
XmlSchema xmlSchema = XmlSchema.Read(xReader,
new ValidationEventHandler(SchemaReadError));
3-XmlSchemaCollection:From its name, it is a Colletion of
Schemas that will be used to validate the XML Documents
4-XmlValidatingReader:Represents a reader that provides
DTD, XML-Data Reduced (XDR) schema, and XML Schema
definition language (XSD) schema validation.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is the difference between xml and xls?
How do I find rss feed url?
What are the standard ways of parsing xml document? Or what is a xml parser?
Explain about core validation?
How do you display xml with xslt?
What is the difference between xml and http?
How can I make my existing html files work in xml?
Can I open an xml file in excel?
What is the purpose of xml?
Does xml support user-defined tags?
Can xml tags have spaces?
Define xpath? And what is xslt?
Is html xml?
How do I convert xml to word?
Can excel open xml files?