XML History

MadhushaPrasad
MS Club of SLIIT
5 min readJul 6, 2023

--

As a company expands its product range or data repository, maintaining its online presence may become more of a burden. Since various businesses utilize different types of backbone networks for their databases, it’s not always simple to handle data or move it to a new system. To enhance the information architecture of the World Wide Web, James Clark led a team of eleven people in the creation of XML (extensible Markup Language), a new markup language. It’s worth noting that the markup language was entirely developed via weekly teleconferences and email.

What is XML?

Data is often described using XML (Extensible Markup Language). Information may be formatted in a variety of ways, and structured data can be electronically shared over the internet and intranets thanks to the XML standard.

Standard Generalized Markup Language (SGML) is the language used to define markup languages, and XML is one of its offshoots.

Documentation, database records, and financial transactions are just some of the numerous uses for the encoding capabilities of XML. It is possible to utilize XML data as the foundation for the development of a wide variety of content, including online, print, and mobile material.

XML documents, like their HTML counterparts, are saved as American Standard Code for Information Interchange (ASCII) files and may be edited in any text editor that supports the Unicode standard.

What is XML used for?

XML’s primary function is to provide a “simple text-based format for representing structured information,” according to the World Wide Web Consortium (W3C), the standards body for the web, including the following:

  • underlying data formats for applications such as those in Microsoft Office;
  • technical documentation;
  • configuration options for application software;
  • books;
  • transactions; and
  • invoices.

XML enables the sharing of structured information among and between the following:

  • programs and programs;
  • programs and people; and
  • locally and across networks.

The W3C defines the XML standard and recommends its use for web content. While XML and HTML are both based on the SGML platform, the W3C has also defined the XHTML and XHTLM5 document formats that mirror, respectively, the HTML and HTML5 standards for web content.

How does XML work?

XML’s success lies in the consistency it brings to data formats. Since XML is so format-specific, any deviation from the anticipated format could cause software intended to read or display the encoded data to report an error.

An XML parser can read and interpret a well-formed XML document, which is valid XML code that adheres to the XML syntax. Elements are the building blocks of all XML documents. They are used to organize and store information. Opening and closing tags denote the start and end of an element, respectively, and further elements or plain data may be placed within.

Programs made to handle XML inputs can reliably process the properly formatted data that XML provides. For example, technical documentation may include an <warning> element similar to that shown in the following snippet of XML code:

<warning>
<para>
<emphasis type="bold">May cause serious injury</emphasis>
Exercise extreme caution as this procedure could result in serious injury or death if precautions are not taken.
</para>
</warning

In this example, this data is interpreted and displayed in different ways, depending on the form factor of the technical documentation. On a webpage, this element could be displayed in the following ways:

WARNING: Exercise extreme caution as this procedure could result in serious injury or death if precautions are not taken.

The same XML code might seem quite different when shown on the UI of a home appliance compared to being printed. It’s possible that this element may cause the highlighted, or emphasis, text to change color and/or blink. The text may be presented in a different typeface and layout when printed.

Presentation is not defined in XML documents, and there are no predefined tags. Most XML applications make use of tag libraries that are specific to a certain XML format. While most users will stick to one of the established XML formats when creating documents, custom XML elements may be developed if necessary.

XML Syntax:

For writing an XML document, there are simple but strict rules [10]:

1. Elements are the primary building blocks of the document

2. XML elements are not predefined. This gives users greater control over them.

3. They are case-sensitive. E.g. : An element tag <Age> is not the same as <age> .

4. All XML elements can have attributes in name/value pairs just like in HTML. But the attribute values should always be quoted.

e.g.: <pen color=”red”>Sheaffer</pen>

6. They must be nested properly

7. They must have opening and closing tags

8. The documents must have a root element.

9. Comments may be denoted as <! — Insert Comment Here →

XML example

<?xml version="1.0" encoding="UTF-8"?>
<library>
<book>
<title>Harry Potter and the Goblet of Fire</title>
<author>J. K. Rowling</author>
</book>
<book>
<title>The Lord of the Rings</title>
<author>J. R. R. Tolkien</author>
</book>
<book>
<title>Fantastic Beasts and Where to Find Them</title>
<author>J. K. Rowling</author>
</book>
</library>

What is the benefit of using XML for documentation?

XML is widely used for technical documentation because it can specify structural information. Other programs can then parse this document structure for output.

For example, in HTML, the user can create different types of lists, including numbered lists, but there is no way to explicitly tag content as being part of a step-by-step procedure. In XML, a procedure tag can be defined to represent a list of items as being the steps of a procedure, including identifying different elements for required steps, optional steps, and alternate steps

References

Follow me on GitHub: MadhushaPrasad

--

--

MadhushaPrasad
MS Club of SLIIT

Open Source Enthusiast | Full Stack Developer👨🏻‍💻 | JavaScript & Type Script , Git & GitHub Lover | Undergraduate — Software Engineering‍💻 | SLIIT👨🏻‍🎓