Introduction


Of all the software technologies that have come and gone in the relatively short time since we all plugged in to the Web, few have been as far-reaching yet misunderstood as XML. Even with its catchy name that conjures up images of extreme sports, the true nature of XML continues to elude many technical people. The reason has to do with the fact that XML is very much a behind-the-scenes technology that helps to ensure that data is structured in an orderly fashion. There are very few situations where an end-user can see XML at work in a practical application. In this way, XML is a lot like residential building codes. When a house is built, thousands of building codes are used to guide contractors so that the house goes up safe and sound. As a homeowner, it's difficult to look at a finished house and grasp how all these building codes impacted the wood, shingles, and brick that you can see and feel. The building codes are abstract in a sense that you can't touch them, but they play a critical role in the construction process all the same. XML plays a similar role in software, including web sites, operating systems, and distributed applications.

I often hear people describe XML as "the new HTML," which sounds good but is not very accurate. XML, unlike HTML, is an extremely broad data-structuring standard that has implications far beyond web pages. For example, consider this question: HTML is to web pages as XML is to what? This is a difficult question to answer because XML isn't really geared toward any one solution. Instead, XML provides the framework for creating customized solutions to a wide range of problems. This is made possible through XML-based markup languages, which are custom markup languages that you create using XML. If you want to chart the statistics of your child's baseball team, you could create your own Little League Markup Language, or LLML, which includes custom tags and attributes for keeping up with important stats such as hits, runs, errors, and parental outbursts. The high degree of structure in your Little League data would allow it to be easily sorted, manipulated, and displayed according to your needs; the data would have the mathematical flexibility of a spreadsheet along with the visual accessibility of a web page. XML makes all this possible.

Maybe you have bigger plans for your XML knowledge than just tracking stats for a Little League team. If so, you'll be glad to know that XML is the enabling technology behind all kinds of interesting software applications. Practically all of the big Internet players have invested heavily in XML. As an example, Amazon.com uses XML to expose its product data so that developers can build custom shopping applications. Another interesting application of XML that has caused quite a stir recently is Google Maps, which is Google's innovative online mapping application. Google Maps relies on XML for map data. In fact, in Hour 15 of this book, "Using XML to Hack Google Maps," you learn how to "hack" Google Maps to use your own XML-based maps. One last example of how XML may have sneakily entered your life already is iTunes, Apple's incredibly popular online music store. iTunes uses XML to store information about your music library locally on your computer. With a little bit of effort, you can access your iTunes music library via XML and view or manipulate it any way you choose. This task is covered in Hour 13, "Access Your iTunes Music Library via XML."

XML is worth learning because it is an excellent back-end technology for storing and sharing data in a highly structured manner. Another reason for learning XML has to do much more directly with the web: XML is very much shaping the future of HTML. As you may know, HTML is somewhat unstructured in the sense that web developers take great liberties with how they use HTML code. Although this isn't entirely HTML's fault, HTML shares a considerable amount of the blame because it doesn't have the structured set of rules that are part of XML. In an attempt to add structure and consistency to the Web, a reformulated version of HTML known as XHTML was created that adds the structure of XML to HTML. It may still be quite a while before XHTML fully unseats HTML, but web developers are busy making the move to a more structured Web thanks to XHTML.

This book, in many ways, is a testament to the fact that XML is a technology for both the present and the future. The majority of the book focuses on XML in the present and how it can be used to do interesting things today. My goal was to strike a careful balance between giving you practical knowledge for the present along with some foreshadowing of what might lie ahead for XML.




Sams Teach Yourself XML in 24 Hours
Sams Teach Yourself XML in 24 Hours, Complete Starter Kit (3rd Edition)
ISBN: 067232797X
EAN: 2147483647
Year: 2005
Pages: 266

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net