问题
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?
回答1:
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.
回答2:
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"
来源:https://stackoverflow.com/questions/9307571/what-is-dtd-exactly