Explain DTD

A document type definition (DTD) describes the permissible tags of an XML document.

The DTD serves as a data template. It defines entities, elements, attributes, and notations, as well as the relationships between these.

For example, the DTD can state that a memo element consists of To, From, Subject, and Message elements.

You need to use a DTD if you want the XML processor to validate your XML documents.

DTDs can help you ensure that your XML documents are well-formed.

You need to indicate to the XML processor that a DTD should be used. This is done by adding a document type declaration before the document element.

The DTD can be internal or external to the document. If the DTD is external, you will need to specify its location or URL.


One Response

  1. […] Hello world! Explain DTD […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: