Question: why xsd is better than dtd?
Answer: There are many differences between DTD (Document Type Definition) and XSD (XML Schema Definition). In short, DTD provides less control on XML structure whereas XSD (XML schema) provides more control. ... DTD doesn't support datatypes. XSD supports datatypes for elements and attributes.