What is Extensible Markup Language (XML)?

Extensible markup language (XML) is a human—and machine-readable coding language that adds structure, meaning, or context to a text document. It ranges from very simple to highly complex. Today’s version of HTML is a specialized example of XML. Schema markup is an example of how XML can be used to improve the user experience (UX) of search engine results pages (SERPs).

Example

Here’s an example of XML:

<bookstore>
<book category=”fiction”>
<title>The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
<year>1925</year>
<price>10.99</price>
</book>
<book category=”fiction”>
<title>To Kill a Mockingbird</title>
<author>Harper Lee</author>
<year>1960</year>
<price>12.99</price>
</book>
<book category=”nonfiction”>
<title>The Elements of Style</title>
<author>William Strunk Jr.</author>
<author>E. B. White</author>
<year>1918</year>
<price>9.99</price>
</book>
</bookstore>

In this example, we have an XML document representing a simple bookstore with three books. Each <book> element contains child elements such as <title>, <author>, <year>, and <price> to represent the attributes of each book. The category attribute in the <book> element specifies whether the book is fiction or nonfiction.

Go back to the Marketing Glossary >>