XML on TPF: A Short Tutorial Page 4 of 14
Create the Sample XML Data Based on the DTD
An XML document is a file that contains data surrounded by XML markup. It must have an XML declaration statement
at the top of the document and may be based on a DTD or XML Schema document.
The two sample applications that you will save to your workstation later in this tutorial demonstrate both validating and nonvalidating parsing. The first XML document is based on
the DTD you saved on the previous page. It begins with
the XML declaration statement, which includes the encoding used in the document. For example:
<?xml version="1.0" encoding="ISO-8859-1"?>
The next statement declares the root element of the XML document (PNRroot) and the DTD on which the XML document is written (pnrdtd):