Validating xml using xsd
Most large XML parsers, ones that support multiple XML technologies, will provide support for DTDs as well.XSD schemas are conventionally written as XML documents, so familiar editing and transformation tools can be used.Because DTDs are one of the earliest schema languages for XML, defined before XML even had namespace support, they are widely supported.Internal DTDs are often supported in XML processors; external DTDs are less often supported, but only slightly.Although being written in XML is an advantage, it is also a disadvantage in some ways.The W3C XML Schema language in particular can be quite verbose, while a DTD can be terse and relatively easily editable.DTD-validating parsers are most common, but some support XML Schema or RELAX NG as well.
W3C XML Schema is complex and hard to learn, although that's partially because it tries to do more than mere validation (see PSVI).
The mechanism for associating an XML document with a schema varies according to the schema language.
The association may be achieved via markup within the XML document itself, or via some external means.
The Document Type Definition (DTD) language, which is native to the XML specification, is a schema language that is of relatively limited capability, but that also has other uses in XML aside from the expression of schemas.
Two more expressive XML schema languages in widespread use are XML Schema (with a capital S) and RELAX NG.
Search for validating xml using xsd:
RELAX NG and W3C XML Schema allow for similar mechanisms of specificity.