How do you load XML document and perform validation of the
document?

Answers were Sorted based on User's Feedback



How do you load XML document and perform validation of the document? ..

Answer / 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

How do you load XML document and perform validation of the document? ..

Answer / dor

Using DTD we can load XML document.
using Parser of XMLSpy to perform validation of the document

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More XML XSLT RSS Interview Questions

Can I use rss feeds on my website?

0 Answers  


Whether root element is required for XML? If so, how many root elements are required?

0 Answers  


If XML attribute name itself has double quotes, then how it can be represented?

0 Answers  


How is xsl different from cascading style sheets? Why is a new stylesheet language needed?

0 Answers  


Which is the best tool one should learn i.e the tool having demand in the market for XSL?

0 Answers  






How do I use graphics in xml?

0 Answers  


Is html5 valid xml?

0 Answers  


What is the Difference between XmlDocument and XmlDataDocument?

1 Answers  


what are the special characters in xml ?

0 Answers  


What is an xml expansion pack?

0 Answers  


How do I write my own dtd?

0 Answers  


Is xml a flat file?

0 Answers  


Categories