Elements

The bulk of actual data in your XML documents will be in the form of elements. Elements are tag pairs, which are case sensitive, consisting of both a start tag, and an end tag. The name of the element itself is called the element type, whereas within a document, when the element occurs it is referred to as an instance of the element.

Start and End Tag Format

Each XML element begins with a start tag, which is the element type, contained within less-than and greater-than symbols:

<example> 

In this case, we have the start tag for an “example” element. The end tag takes a similar form; however, the element type is prefixed by a slash:

</example> 

the slash denotes that this is the end tag, signifying the end of the element.

The complete ...

Get Special Edition Using XML, Second Edition 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.