XML (Extensible Markup Language)

EXtensible Markup Language (XML) is a programming language used to categorize and describe data. As a type of markup language, XML uses tags or rules for tags to add information about data. Tags used in XML coding help describe the data inside the tags. XML does not rely on any particular software or hardware. It also is written in plain text, so it can be shared easily among different programs and devices.

XML and Other Markup Languages

Even though XML is a markup language, it is different from some other markup languages because it was created to label and categorize data rather than display data. One of the most popular markup languages is HyperText Markup Language (HTML). HTML adds information about the format and the appearance of text. XML, however, adds information about the data included inside the tags. The goal of HTML is to display text in a certain way, while the goal of XML is to describe data.

XML and HTML have another important difference: XML tags are not predefined, but HTML tags are. A person using HTML has to memorize or look up specific tags to use to have data display in a particular way. XML users, however, can develop unique tags to describe data. One other difference between XML and HTML is that XML is more rigid. HTML is a fairly flexible language and can tolerate some coding errors. XML, however, has to be formatted very specifically because errors can be introduced easily.

History of XML

The World Wide Web Consortium (W3C)—which is a group of volunteers and paid employees who create standards for the Web—wanted to create a new type of markup language that was useful on the Internet. The group decided to base the new language on another type of markup language called standard generalized markup language (SGML). SGML is made up of elements, and these elements usually consist of a start tag, content, and an end tag (e.g., <firstname>Jose</firstname>). The group from W3C structured XML in much the same way.

Members of W3C developed the first draft of XML in 1996. They distributed coding instructions in a twenty-five-page manual and released it to the public. The W3C recommended the use of XML in 1998. Soon, XML became an important markup language that many people used for different purposes. Some people used XML on the Web, and others used it in electronic publishing, in databases, and in other types of documents. The W3C working group intended to create a markup language for the Internet, but they created a markup language capable of being used in many different situations.

Throughout the history of XML, groups at W3C and other individuals and groups around the world have worked to further develop the language. Today a working group at W3C continues to refine the specifications for XML, though people and programmers outside W3C also influence it. The W3C publishes its work so others can use XML and make changes and enhancements to the language. Numerous conferences about XML, its standards, and its uses are held around the world each year, proving the language's continued popularity.

Uses of XML

One of the main uses of XML is to categorize data. XML can be used on the Web to classify information. The idea of data categorization is especially important on the Semantic Web, which is the Web of data. XML can also be used to separate data from other elements on a Web page. For example, a programmer can use XML to keep the data of a Web page separate from the HTML coding on that page. This separation allows the programmer to update the data without updating the HTML.

Another important use of XML is data transport. At times, data has to be shared between two different programs that are incompatible with one another. Because XML does not rely on a specific type of software, it is compatible with many different programs. Sometimes, XML can help two incompatible programs share data with each other. In a similar way, data sometimes has to be shared when a platform (either software or hardware) is being upgraded. These upgrades can be time-consuming because of the large amount of data that needs to be shared. However, XML is useful because it can make transferring the data much simpler.

Adding XML to Documents

One way people use XML is to add markup to documents. Often in documents using XML, the first line of code is called the declaration line. The declaration line states that XML is being used and identifies the version of XML being used (e.g., <?xml version="1.0" encoding="UTF-8"?>). The line after the declaration is a line that describes the root element. This information tells what type of document is being coded (e.g., <note>). The lines after the root element contain the content of the document and can be coded to show the function of each piece of data (e.g., <heading>, <body>, <conclusion>). The document then ends with a tag that shows the text is complete (e.g., </note>).

People using XML have to remember some important rules about the language. If any opening tag is used, a corresponding closing tag must also be used (e.g., <firstname> and </firstname> or <note> and </note>). Other markup languages, such as HTML, do not always require closing tags, but XML does. Along the same lines, XML tags have to be nested properly. That means the elements opened first must be closed last. For example, <i><b>word</i></b> is nested incorrectly, but <i><b>word</b></i> is nested correctly. Another factor people using XML have to remember is that the language is case sensitive, so the tag <Note> and the tag <note> are not the same.

Bibliography

"A Brief SGML Tutorial." W3C. W3C. Web. 11 Aug. 2015. http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html

"Definition of: XML." PC Mag. Ziff Davis, LLC. PCMag Digital Group. 13 Aug. 2015. http://www.pcmag.com/encyclopedia/term/55048/xml

"Development History." W3C. W3C. Web. 13 Aug. 2015. http://www.w3.org/XML/hist2002

"Extensible Markup Language (XML)." W3C. W3C. Web. 13 Aug. 2015. http://www.w3.org/XML/

Hollander, Dave, and C.M. Sperberg-McQueen. "Happy Birthday, XML!" W3C. W3C. Web. 13 Aug. 2015. http://www.w3.org/2003/02/xml-at-5.html

Rouse, Margaret. "XML (Extensible Markup Language) Definition." TechTarget. TechTarget. Web. 13 Aug. 2015. http://searchsoa.techtarget.com/definition/XML

"XML Introduction." Mozilla, 27 June 2024, developer.mozilla.org/en-US/docs/Web/XML/XML‗introduction. Accessed 22 Nov. 2024.

"XML Tutorial." W3Schools. W3Schools. 13 Aug. 2015. http://www.w3schools.com/xml/