What is DTD exactly?
Asked Answered
A

2

5

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?

Aquitaine answered 16/2, 2012 at 8:4 Comment(1)
Also related: What is difference between XML Schema and DTD?Regime
C
11

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.

Corrinnecorrival answered 16/2, 2012 at 8:6 Comment(2)
Thanks..keeping this analogy in mind, w3schools tuts have started making sense to me. :)Aquitaine
Note that DTD is deprecated in favor of the more declarative and powerful XSD.Cini
N
0

DTD is exactlly set of rules that the XML documents must follow . Check these rules with XML document if it is right get " valid " otherwise "not valid"

Nickens answered 30/9, 2014 at 21:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.