26.01.2019 Views

XML Simplified

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Module 3<br />

DTDs<br />

The following code demonstrates the properties of internal DTDs.<br />

Code Snippet:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Concepts<br />

3.2.3 DOCTYPE Declarations<br />

A Document Type Declaration declares that the <strong>XML</strong> file in which it is present adheres to a certain DTD.<br />

The declaration also specifies the name of that DTD and either its content or location.<br />

Placed in the <strong>XML</strong> document's prolog, a DOCTYPE declaration begins with . In between is the name of the root element, followed either by a pair of square brackets containing the<br />

DTD itself or by the SYSTEM keyword and a URL specifying where the DTD can be found.<br />

Without the document type declaration, a DTD is nothing but plain text.<br />

Figure 3.1 shows the DOCTYPE declaration.<br />

Figure 3.1: DOCTYPE Declarations<br />

<strong>XML</strong> <strong>Simplified</strong><br />

Version 1.0 © Aptech Limited

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!