State the advantages of XML schemas over DTD?

Microsoft developed a language known as the XML Schema Definition (XSD) to describe the schema to an XML document. The following are the advantages of XML schemas over DTDs:

XSD keeps much better control over types of data than the DTD.

DTD does not allow creating customized data types while the XSD provides full support to create customized data types.

XSD allows you to specify restrictions on data. It means that you can define the type of data that should be stored in an element, for example numbers or alphabets.

The XSD is quite easy to learn and to understand because its syntax is same as that of the XML document.