What is XML?You might think of XML as the Zen of the coding world. Its purpose isn’t to do; it’s simply to be. W3Schools notes the following paradox: While XML doesn’t actually do anything, it may be as fundamental to the web as HTML. XML, or Extensible Markup Language, stores data in a form where it can easily be retrieved and shared – even by incompatible applications. Here is a common scenario: Data is stored as XML, retrieved by Java, and displayed in HTML. The underlying code remains the same (meaning that a programmer doesn’t have to sit there all day making changes), and the screen doesn’t refresh constantly, annoying the end user. But when there’s a need for new data, it’s there in its current form. XML is commonly used for documents that are in multiple languages or where there are multiple variants that serve the needs of different users. XML can, for example, be used to differentiate learning content for visually impaired learners. If you’re using it for this purpose, you don’t have to create a separate document for each use. You simply create rules that will determine how the data is handled by different applications. "While XML doesn’t actually do anything, it may be as fundamental to the web as HTML." ~ W3Schools
Later Ajax or some other scripting language will “read” the XML and determine how to display data for the audience at hand. One other potential advantage to using XML is that some processing can be moved client-side as opposed to server-side. XML is more customizable than HTML. In HTML, you use tags that are pre-determined and have been defined in the language standard. With XML, you get to define your own tags. XML is designed in a way that allows individual industries to use their own vocabulary and create their own document structures. In a sense, you’re creating your own language. It’s relatively easy for someone later to look at your code and make sense of it. (If you don’t specify how it’s supposed to be read, though, you’ll find that it’s your code/ mark-up displaying there in the browser.) XML is used for data and content management in many industries. Industries have created their own standards for XML documents. Some examples are SCORM (used in e-learning) and HL7 (used in healthcare). A number of new languages have been based off XML. They are designed to meet the very specific needs of particular industries. XML can be an efficient way of storing video and other multimedia. This led to the development of SMIL, a language that is based in XML and used for streaming. XHTML, as the name implies, has features of XML and HTML. History of XMLSome languages trace their roots to individuals trying to solve small scale or localized problems. XML was put together by a team, working to develop a product with wide-scale application. The problem they were tackling? Making the internet more usable. You don’t usually use XML in isolation – you use it in concert with other computer languages.
The team didn’t work from scratch. SGML provided most of the foundation. Development commenced in 1996, and a working copy was released within five months. XML 1.0 was approved by the W3 in 1998. Version 1.1 followed in 2004. XML is maintained by the W3C. Learning XMLYou don’t usually use XML in isolation – you use it in concert with other computer languages. You generally begin study after you’ve got a foundation in basic computer languages like HTML and Java or CSS. Some XML tutorials, like the one from W3Schools, even specify what languages you will need to know as a foundation. There are a number of tutorials to select from: QuackIt offers a tutorial for relative beginners. The first section is about the basics of XML; there are other sections about creating rules, presenting documents, and creating rules. Stylus Studio has a lot of resources at different levels. And then there’s “Learn XML in 11.5 minutes”, a tutorial created by Tech Community. You use a text editor like NotePad, enter a little code, and read about what you can and can’t do with that code. It can be an interesting exercise if you have a foundation in coding and want to get a sense of what’s unique about the language, but XML is generally much more of a time investment. |