Introduction to XML in Flash
       by senocular

It wasn't my intent to cover XML and database interaction here (nor XML Sockets); I just wanted to hit the bases of normal XML usage. So if you were expecting more out of this introductory tutorial, I apologize. I will say a few things about databases before wrapping up, however.

First off, yes, you can store XML in a database like a MySQL database. Nothing surprising there. But you don't need a database to use XML. You can just as easily save it as a simply text file on your server with something like PHP or ASP... or even manually your own darn self using a FTP client (if you have no plans of letting users edit it dynamically). After all, XML is just text. You just can't be using the FTP client via Flash as you can with PHP and server-side scripting of the likes.

Now there are XML-based databases in existence. For the most part, however, XML is not a formidable replacement for other forms of databases (like MySQL). Often is the case that the XML content, especially when dealing with a lot of it, would be preserved much more efficiently in another database system rather than an XML "database" or as an XML file. This doesn't mean XML is out the window at this point. It just means that there are more efficient means of handling (a lot of) content compared to that provided by XML.

For more XML's roll on the server-side/database side of things, see the following discussion from (not directly Flash related).

You can also find a little more about XML and server-side interaction from the Flash XML Faq.


There are a lot of possibilities with XML in Flash as we've seen with the many examples presented throughout this tutorial. But still, it really all boils down to the interaction of external data with a running Flash movie. Even the more complicated examples deal more with data management and simply dealing with the complex nature of the XML object. Once mastered, however, you'll be able to take full advantage whatever content you need and do with that content anything your imagination and creativity can unleash.

Hopefully this tutorial and the examples within have provided you with a better understanding of it all. Some parts may have been long-winded while others may have been a little brief in the ways of description, but all in all I hope you've come out of it learning at least a little something.





External Links Summary

XML on origin
XML on origin
SGML origin
Entity references origin
XHTML origin
FTML origin
Layer51 Prototypes origin
XPath origin
XFactor Studio XPath for AS1 origin
XFactor Studio XPath for AS2 origin
Flash MX 2004 7.2 Updater origin
Colin Moock: Loading Cross Domain XML origin
Unicode Charts origin
XML vs Database Discussion origin
Flash XML FAQ origin


Source Files Summary

Load Security Text (zip) origin
Squirrel Finder (zip) origin
Portfolio (zip) origin
Searching Best of (zip) origin
MX 2004 ActionScript Classes (zip) origin
Sorted Grades List (zip) origin
Additional Helpful Methods (as) origin
MP3 Playlist (zip) origin
Simple Editor (zip) origin
News Editor (zip) origin




SUPPORTERS:'s fast and reliable hosting provided by Media Temple.