What is a DTD?

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

What exactly is the meaning of DTDs and why are type definitions so important?

+4
source share
2 answers

Think that this is a bit like a schema for a database - we are used to the idea that in regular relational databases you can only use columns that have already been declared, and you need to insert the required data types into them. Well, DTD does roughly the same for XML documents.

+10
source

A DTD is exactly the set of rules that XML documents must follow. Check these rules with the XML document, if it is right, "acts", otherwise "invalid"

0
source

Source: https://habr.com/ru/post/1396781/


All Articles