Validating xml using dtd
The XML Schema language does not define what must occurs when an instance document includes both an XML schema and a DTD.Thus, the behavior of the application in such cases depends on the implementation.
Depending on its implementation, a validating parser may: A validating XML parser tries to determine whether an instance document conforms to the rules of its associated XML schema.
When the program encounters the invalid node, the method Validation Error is called that displays a message explaining why validation failed. An object of the class Xml Schema Set stores a collection of schemas that an Xml Reader can be validated against.
It assigns a new Xml Schema Set object to variable schemas, and calls this object's Add method to add a schema to the collection.
XML DTDs enable the specification of: An XML DTD is not itself written in XML, but is a context-independent grammar for defining the structure of an XML document.
You can declare a DTD in an XML document itself or in a separate file from the XML document.