Introduction to XML

XML = Extensible Markup Language

XML is a highly versatile markup language from WWW Consortium, W3C. While the normal web markup language, HTML only helps display the data on a browser, XML goes one step deeper, by defining the actual organization of the data and how it is stored on a file.

XML, as evidenced by its name, is an extensible markup scheme—it may be extended to include your custom elements or tags. XML provides you the ability to display data as well as serialize it (i.e., store in a particular format).

The most important property of XML is that it allows you to define your own tags (elements), while HTML or any other markup scheme for that matter has its own built-in tags, and you cannot invent new tags. XML doesn’t come with any built-in tags, you can create what tags you wish to use.

Take a look an XML markup:

<book>
<title>The Spring</title>
  <author>James Milton</author>
  <publisher>Bloomsbury</publisher>
  <year>2008</year>
  <month>January</month>
  <sales>100,000</sales>
</book>

This is a typical XML markup. The writer invented all the used tags. This is just a markup, with no power to do anything. However, anyone can understand what it means. It is the information of the publication of a book named The Spring. The power of this markup is that people can create pieces of software to manipulate this data in any way they want.

Uses and Advantages of XML

XML is a human readable markup, used mainly to store the data in a format accessible and manageable even with Notepad.

XML is useful for data storage and sharing between different platforms. It helps communication, since it is entirely based on plain text. So, data transfer to a different platform is extremely easy with it.

It preserves the structure of the data and is capable of handling computer data structures such as strings, graphs, records, lists, dictionaries, etc., easily.

Since XML supports Unicode, it can universally show, store, and process any of the world languages.

It can be used to create newer markup languages and standards. Already there are thousands of new languages based on XML. Some of them are XHTML, RSS, WSDL, WAP, SMIL, RDF/XML, OWL, MathML, GraphML, etc.

Data sharing is extremely simplified with XML formats. With XML more popular tomorrow, the applications can be made to understand the data used in other applications. This will enable boundless data sharing among applications. Already, many open source software support open standard XML file formats. When more applications join the queue, the data will be totally open to all.

XSLT and CSS: Viewing XML Files

When viewing a generic XML file like the one you found above through a browser, you can see nothing more than the code. It just stacks up according to the elements giving a tree-like structure in the browser window. However, you have such tools as XSLT (Extensible Stylesheet Language Transformations) and CSS (Cascading Style Sheets). These are formatting schemes, which format the XML markup to display it in a particular way in the browser. The contents of each element may be formatted; the XML file can thus be displayed just as a HTML file.

Conclusion

XML as a markup scheme is extremely important to tomorrow’s open-data world. It affects the way the data can be organized, and hence, it is one of the enabling technologies of Web 3.0 and the Semantic Web. In collaboration with technologies like RDF (Resource Description Framework) and OWL (Web Ontology Language), XML will help realize the Semantic Web.

Author: Commissioned,  Published: 2010-01-14
Subscribe to us on YouTube