10.1 XML Applications

There are many other applications of XML beyond what has been covered here. I will briefly introduce you to a few, so you can be familiar with them and decide if you would like to learn them. This will conclude this book of XML and hopefully open another for you.

One that I have been mentioning throughout the book is AJAX. AJAX stands for Asynchronous JavaScript And XML. It is basically the combination of DHTML (Dynamic HTML, which itself is the combination of JavaScript, CSS, and the DOM) and XML using the XMLHttpRequest object in JavaScript. The XMLHttpRequest object is basically a tiny little web browser that transmits data to, and requests an XML document from the web server. You then parse that XML in your JavaScript and display it on the same page, allowing new information to be displayed without loading a new page. Effective use of AJAX requires knowledge of server-side scripting languages, JavaScript, and the Document Object Model, each of which is a book by itself; therefore I could not cover it here. However, AJAX is one of the most wanted features in new web applications because it provides instant feedback rather than the historic page-by-page model of web browsing. The Mozilla developer site has a great, brief tutorial on AJAX.

The Scalable Vector Graphics vocabulary has been used in examples in this book. It is a W3C recommendation for the creation of, for lack of a better way to explain it, scalable vector graphics. Vector graphics are graphics that are defined not in pixels, but as shapes and polygons that are filled with color or painted with bitmap graphics (those are the kind of graphics that have pixels). Since these graphics are made up with infinitely complex shapes, you can increase the size without ever noticing pixelization (where each pixel appears to be a square of one color, giving the image a jagged look). You can pick up SVG fairly quickly just by reading the W3C recommendation; it is one of the more clearly written W3C standards.

MathML (Mathematical Markup Language) is used to display mathematic expressions, ideally on the web, the way they were meant to appear. If you have ever tried to enter something even so simple as the addition of two fractions into the computer, you have surely noticed that it is not a visually appealing task. Often we just try to fit the entire expression on one line of text. MathML allows us to divide the expression into parts, such as the expression in the dividend and the expression in the divisor of the fraction, and then puts them together into a pretty equation. You can learn MathML from the W3C site.

The last one is a kind of neat XML vocabulary to end the book on. This is a great example of an innovative use of XML. Andreas Saremba, presumably a chess fan, designed an XML vocabulary to represent the players and moves in a chess game and called it ChessGML (Chess Game Markup Language). Things got even more interesting when Max Froumentin, a W3C member, showed off XSLT and SVG's powers by producing an animated SVG image to recreate the game, step-by-step, from a ChessGML XML file. You can view the example and find out more about ChessGML at Max's site.

There is only one XML vocabulary that is more powerful than everything I've covered in this book. That is the XML vocabulary you create yourself. Only you can decide what elements you would like to use to contain your data. By clearly documenting your new XML vocabulary, you might even convince others to adopt your system! When using XML, you guarantee that any user, on any system, has the capability to process and use your data, which cannot be guaranteed for any closed, proprietary data format. This book should only be the beginning of your XML journey; hopefully by the time it ends, you will have made quite a few things more accessible and maintainable through Extensible Markup Language.