Document Type Declaration

The DTD is a file that contains rules that the XML code in the file has to follow. It can be thought of as the grammar that the XML document must abide by in order to be a valid XML file.  When referencing and external DTD, there are two type declarations that can be used: PUBLIC and SYSTEM. PUBLIC should be used when the XML document will be under the rules of a publicly distributed DTD.  In other cases, SYSTEM should be used.  Below is an example of a declaration for a public DTD

Example: <!DOCTYPE html PUBLIC “-//FIND//IT//HERE//EN”



•   !DOCTYPE – Indicates to the XML processor that this code defines a DTD.

•   html – this portion specifies the root element of the XML document.  In this case, it is HTML.

•   PUBLIC – Indicates that this is a DTD that is publically available.

•   “-//FIND//IT…” – This is a definition of the public document.

•   “…” – This address provides the location of the DTD.

This entry was posted in XML Tutorial. Bookmark the permalink.

7 Responses to Document Type Declaration

  1. Alpha Luczki says:

    steam cleaners can clean lots of dirty clothes in a very short period of time that is why i always prefer to use them,

  2. ed sheeren says:

    Hey! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a outstanding job!

  3. Often have in order to post a new review, My partner and i cannot help it ! Thanks Sarah

  4. Harry Potter is the best, i really like Daniel Radcliffe because he acts very well*

  5. I can never think precisely how much with this I probably did not really comprehend. Thank you for offering this content. More than likely to go back on this page to get when there is any fresh new content.

  6. Me like, will read more. Thanks!

  7. Good, this is what I was looking for in bing

Leave a Reply

Your email address will not be published.