XML (Extensible Markup Language) is a flexible way to structure data for storage, transmission, and parsing. Traditional name-value pairs, used by standard GET and POST form actions, are fine for transferring small amounts of simple data. However, this technique isn’t well suited for large amounts of data or when you have to carefully organize the data.
For example, name-value pairs are limited to associations that link a single value with a single variable. Complex associations where variables must be grouped in some manner are arguably impossible, or would require multiple variables with similar names.. You could get a basic database-like structure this way with name-value pairs:
Using XML, however, you can easily associate related variables. The preceding name-value pair submission could be represented this way in XML:
<user> <first>John</first> <last>Public</last> <joined reg="yes">2007</joined> </user>
You can imagine, when this data enlarges to many users, how much more easily you can work with a single variable that contains data that’s organized consistently.
Although this book discusses ActionScript 3.0’s ability to manipulate XML, it can’t delve into the basics of XML. However, you’ll find a bountiful supply of information online. One such resource is the World Wide Web Consortium home for XML coverage, http://www.w3c.org/XML/.
For the purposes of this ...