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
How do I view xml data?
What is the purpose of xml namespaces?
What are xml attributes?
What are advantages of xml?
What is the difference between xml and http?
Explain about the dtd features?
What is the difference between xsl and xsd?
What are the types of XML Parsers?
What is xml dtd?
Write a code for xml attribute and element.
What is the difference between versions 1.0 and 1.1 of the xml namspaces recommendation?
What is rss subscription?
How xml makes your data more available?
Why is my rss feed not working?
If I replace my Sqlserver with XML files and how about handling the same ?