What is DTD (Document Type definition)

Q

What is DTD (Document Type definition)?

✍: Guest

A

It defines how your XML should structure. For instance in the above XML we want to make it compulsory to provide “qty” and “totalcost”, also that these two elements can only contain numeric. So you can define the DTD document and use that DTD document with in that XML.

2007-10-31, 5408👍, 0💬