As I explained at the end of the last article. You create a Document Type to define the rules that must be followed in your XML Markup. A DTD defines what elements are required and what attributes can be set and what their potential values can be.
Every DTD must start with the line <?xml version=”1.0” encoding=”UTF-8” standalone=”no”?>. This tells the processor that this is an XML version 1.0 file. The character encoding used is of type UTF-8. And, that no external file is required for this document to work.
Also make sure that when you are creating DTD’s that !ELEMENT, !ATTLIST, #REQUIRED, #PCDATA, #CDATA, etc. are all capitalized.
There you are all up to speed. Now on to DTD Prologs… Continue reading Learn XML Document Type Definition’s →