Components of an XML Document

So far, I have provided some background material and discussed some of the characteristics of XML, but you still don’t really know what makes up an XML document. In this section, I’ll discuss the components required to build an XML document and then present an XML document that illustrates these various components.

Types of Markup

An XML document is a text file that consists of character data and markup. In the case of XML, there are several different constructs that are considered to be markup. A summary of these different constructs is shown in Table A.1.

Table A.1. Summary of XML markup.
Markup Description
Start tag Used to mark the beginning of a non-empty XML element (for example, <address>). Note that ...

Get XML and Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.