XML Elements

Much like HTML, XML is a markup language with documents composed of tags that “mark up” the data in a document. A typical XML document will contain a large number of these tags, start and end tags, with data contained within the tags. For example, if we were looking at the representation of a name in XML, we might have

<name>John Doe</name> 

Here we have two tags— the start tag <name> and the end tag </name>. Tags are a very important part of XML. They are what you use to mark the beginning and ending of elements in your XML documents. The two tags, taken together along with the content between them, constitute an XML element.

We would actually refer to the element by the element type, which is synonymous with the name used in the ...

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.