Working with XML Structures
XML documents are similar to HTML documents in that they are text-based, and contain hierarchies of elements. In the last few years, XML has become very popular for packaging and delivering all kinds of data.
Incidentally, XML puts the X in AJAX, and the prefix in XMLHttpRequest
. However, once again, note that using XML is optional. In the previous exercise, you created a simple application that made an asynchronous call to the server, just to receive a text document; no XML was involved.
Note
XML is a vast subject, with many complementary technologies. You will hear people talking about DTDs, schemas and namespaces, XSLT and XPath, XLink and XPointer, and more. In this book we will mostly use XML for transmitting simple structures of data. For a quick-start introduction to XML we recommend http://www.xmlnews.org/docs/xml-basics.html. If you don’t mind the ads, http://www.w3schools.com/xml/default.asp is a good resource as well. Appendix C available at http://ajaxphp...