XML (Extensible Markup Language) is a text-based markup language for representing structured data. Unlike HTML, XML does not define a fixed vocabulary of tags; an XML format defines element names appropriate to its own data.
XML is designed so data can be stored, exchanged and parsed consistently across systems. XML is used by formats and technologies such as RSS, SVG, SOAP documents, configuration files and many application-specific data feeds.
<?xml version="1.0" encoding="UTF-8"?>
<book id="B101">
<title>Learning XML</title>
<author>Sam Lee</author>
</book>
The element names describe the data. The application reading this document decides what those names mean.
< and & must be escaped when they are data rather than markup.A document can be well-formed because it follows XML syntax, and it can additionally be valid when it conforms to rules defined by a schema or DTD.
HTML defines elements such as <p>, <a> and <table> for web documents. XML lets a data format define its own element vocabulary. HTML parsing in text/html also has error-recovery rules and permits some omitted tags, while XML parsing requires well-formed syntax.
The declaration is optional in many XML documents, but when used it appears at the beginning and can specify the XML version and character encoding.
<?xml version="1.0" encoding="UTF-8"?>

XML file structure and elements XML attributes
Is XML a programming language?
No. XML is a markup format used to represent structured data.
Are XML tags predefined?
XML itself does not define application-specific element names. A particular XML vocabulary or schema defines the names and rules it uses.
Is XML case-sensitive?
Yes. <Name> and <name> are different element names.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.