---
title: "What is the difference between an XML schema and a DTD?"  
description: "What is the difference between an XML schema and a DTD?"  
author: "Anonymous User"  
published: 2011-02-07  
updated: 2020-09-14  
canonical: https://www.mindstick.com/interview/353/what-is-the-difference-between-an-xml-schema-and-a-dtd  
category: "xml"  
tags: ["xml"]  
reading_time: 1 minute  

---

# What is the difference between an XML schema and a DTD?

The **XML Schema** is the officially sanctioned Schema definition. Unlike DTDs, the format of XML Schemas follows the rules of well-formed XML documents. The Schema also allows for much more granular control over the data that is being described. Because of the XML format and the detailed format controls, Schemas tend to be very complex and often much longer than the XML documents that they are describing. Schemas are often much more easy for developers to read and follow,due to the less cryptic nature of the references in Schemas versus DTDs.

## Answers

### Answer by Anonymous User

The **XML Schema** is the officially sanctioned Schema definition. Unlike DTDs, the format of XML Schemas follows the rules of well-formed XML documents. The Schema also allows for much more granular control over the data that is being described. Because of the XML format and the detailed format controls, Schemas tend to be very complex and often much longer than the XML documents that they are describing. Schemas are often much more easy for developers to read and follow,due to the less cryptic nature of the references in Schemas versus DTDs.


---

Original Source: https://www.mindstick.com/interview/353/what-is-the-difference-between-an-xml-schema-and-a-dtd

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
