Chapter 1 — Introduction to XML and Data Structure
An XML document must follow strict structural rules. It must contain a single root element that encloses all other elements. Elements must be properly nested and every opening tag must have a matching closing tag. This strict structure ensures that XML documents can be reliably processed by software systems.
Example: XML structure
<book>
<title>Learning XML</title>
<author>John Smith</author>
<year>2024</year>
</book>The <book> element acts as the root that contains the rest of the information.