Nepedia
Back to Discover
Advanced Reader
💻

XML

technology Maturity 7-9 Next article →

Extensible Markup Language, or XML, is a specialized markup language and file format. It is used for the storage, transmission, and reconstruction of data. This process is known as serialization. Serialization allows different, separate computer systems to exchange information by agreeing on a single file format. Because of this, XML acts like a lingua franca, which is a common language used by many different groups. XML is designed to be both human-readable and machine-readable. It emphasizes simplicity, generality, and usability across the entire Internet.

To organize information, XML uses a system of markup and content. Markup consists of specific strings of characters that follow syntactic rules. These strings usually begin with a less-than sign < and end with a greater-than sign >. They can also begin with an ampersand & and end with a semicolon ;. The information located between these markup markers is called content. An XML processor, often called a parser, analyzes this markup. It then passes the structured information to an application for use.

There are several specific types of markup constructs within an XML document. The first is an element, which is a logical component of a document. An element starts with a start-tag and ends with a matching end-tag. The text inside is the element's content, which may include child elements. For example, <greeting>Hello, world!</greeting> shows a greeting element. The second type is an attribute, which is a name-value pair located inside a tag. In the tag <img src="madonna.jpg" alt="Madonna" />, "src" and "alt" are the attribute names. Their values are "madonna.jpg" and "Madonna."

XML documents must follow strict rules to be used correctly. A document that follows the basic syntax rules is described as "well-formed." If a document also adheres to a specific XML schema, it is called "valid." An XML schema, or XSD, provides the necessary metadata to interpret and validate the data. This schema acts as a set of rules for the document structure. Furthermore, the IETF RFC 7303 provides rules for constructing media types for XML messages. These include application/xml, application/xml-external-parsed-entity, and application/xml-dtd.

History shows that XML has been a standardized tool for many years. The World Wide Web Consortium released the XML 1.0 Specification in 1998. These specifications are free, open standards available to everyone. There is also an XML 1.1 version that extends certain capabilities. To handle various human languages, XML uses the Unicode character set. This allows the language to support many different scripts, such as Chinese, Armenian, and Cyrillic. XML even includes mechanisms to identify the specific encoding being used, such as UTF-8 or UTF-16.

Because some characters can cause errors, XML uses a process called escaping. Certain characters, like < and &, are used for syntax and cannot appear directly in content. To include them, users use predefined entities. For example, &lt; represents <, and &amp; represents &. If a user needs to include a character that is not on their keyboard, they can use a numeric character reference. For instance, the Chinese character "中" can be written as &#20013;. This ensures the data remains accurate during transmission.

XML is used extensively across many different industries and technologies. It serves as the base language for communication protocols like SOAP and XMPP. It is also a message exchange format used in AJAX programming. Many document formats rely on XML syntax, including RSS, Atom, SVG, and XHTML. In the business world, standards like Health Level 7 and the OpenTravel Alliance are based on XML. Even in science, XML is used to represent operational meteorology information through IWXXM standards. It is a fundamental tool for modern digital communication.

616 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

✨ What else?

Related topics you might enjoy

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.