Elements

XML elements must have as their element type name a legal XML name as defined in the preceding section.

Additionally, the element type name in the start tag must match the element type name in the end tag. It is important to remember that XML is case sensitive. Any of the following tag pairs will generate well-formedness errors because of case differences:

<title></TITLE> 

<title></Title> 

<title></Title> 

Balanced Start and End Tags

Each start tag must have a corresponding end tag, properly nested. The following example is correctly nested:

<oneElement>Some text 
 <anotherElement>Some other text 
 </anotherElement> 
<oneElement> 

The end tag of the anotherElement element must appear before the end tag of the oneElement element.

If an element ...

Get Sams Teach Yourself XML in 10 Minutes 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.