O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Document Type Declaration

The Document Type Declaration, also called the DOCTYPE declaration, is optional. If present, it must occur before the document element. The DOCTYPE declaration specifies the element type name of the document element and, optionally, references external markup declarations or may include markup declarations.

The simplest form of the Document Type Declaration may be written as follows:

<!DOCTYPE theDocumentElement > 
<theDocumentElement> 
<!-- The content of the document element would go here --> 
</theDocumentElement> 

As written, the preceding DOCTYPE declaration simply indicates that the document element of the XML document has the element type name of theDocumentElement.

In addition to indicating the element type name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required