Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is DTD exactly?

Tags:

xml

dtd

I have used DTD several times in my document, but I never knew its significance. I have also tried to understand W3Schools tutorial of DTD. But I found it too theoretical.

What is the significance of DTD exactly, and why are type definitions are so important?

like image 627
hrishikeshp19 Avatar asked Dec 28 '22 05:12

hrishikeshp19


1 Answers

Think of it as being a bit like a schema for a database - we're used to the idea that in normal relational databases you can only use columns which have already been declared, and you have to insert the right kind of data in them. Well, a DTD does roughly the same kind of thing for XML documents.

like image 165
Jon Skeet Avatar answered Jan 12 '23 13:01

Jon Skeet