XML (Extensible Markup Language) is a markup language that was released by the World Wide Web Consortium (W3C) in 1998. It allows users to create their own tags to “mark up” (i.e., describe) documents. XML documents can be easily read by both humans and machines. Since XML stores data in a plain text format, it is software- and hardware-independent, making it useful for data sharing. XML also supports Unicode, which means that it can be used to transmit information in most languages.
XML uses elements to create the structure of XML documents. Elements typically describe what something is. Each element has an opening tag (e.g.,
<title>) and a closing tag (e.g.,
</title>), unless the element is self-closing (e.g.,
<lb/>). All XML documents are formed as “element trees” which begin at a root element that contains all the other elements. By nesting elements, encoders can create parent-child and sibling-sibling relationships. Attributes can be added to elements to add supplemental information and values are used to specify attributes.
- The following example shows a basic XML tree where the element
<person>has been specified by the attribute
@typeand the value
<person type="author">Margaret Laurence</person>
- The following example shows a basic XML tree where
<person>is the parent of
<persName>is the child of
<person>. The elements
<surname>are all the children of
<surname>are siblings of each other.
- Birnbaum (2021) “What is XML and Why Should Humanists Care? An Even Gentler Introduction to XML”
- Flynn, Silmaril Consultants, & Textual Therapy Division (2022) “Section 1: Basics General Information About XML”
- Walsh (1998) “A Technical Introduction to XML”
- W3C (2015) “XML Essentials”
- W3C (2016) “Extensible Markup Language (XML)”
- W3Schools (2022) “XML Tree”
- W3Schools (2022) “XML Tutorial”