This is an archived tutorial from the kirupa.com legacy collection. It covers software that may no longer be available, but it is kept online because the ideas still hold up.
XML Basics
Before
using XML in Flash, lets first learn what XML
is, at least at its basic form. Entire books
have been written on XML and the use of XML
in Flash. Here, I intend to keep things simple
enough to get you started yet attempt to provide
you with enough information to at least make
you feel comfortable when working with XML in
Flash.
So, XML; what is it and why does it exist? Basically, XML (eXtensible Markup Language) is a tagged markup format that was created to serve as an easily usable, readable method to format information within a basic text file. One of its primary advantages is that it allows you to store this information in a hierarchical manner. This means you can store information within other chunks of information much like a folder hierarchy on your computer. In fact, you can think of XML just as that, as a text write-out of a hierarchical file system which stores textual information. XML is NOT really a script and does NOT really "do" anything; it's basically just a fancy text file (though based on what you are using to interpret the XML it could potentially be script-like). Where you may normally use a text file, you can instead use XML where XML will provide you with greater structure and clarity for storing the content within.
For more information on XML beyond laymen's terms, see:
http://www.xml.com/
http://www.w3.org/XML/
Basic XML Structure
In looking at an example of XML, you'll notice
it looks a lot like HTML. In a way, HTML is
a type of XML (though HTML was around before
XML - both are based off of SGML).
Their structure is, in many, cases the same.
Here's a simple example of an XML file:
<letter>
<to>Sandy</to>
That wraps up this tutorial. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums. Your support is what keeps writing like this online! 😇
This tutorial was written by senocular, also known as Trevor McCauley. He has been one of this community's most generous teachers since the early Flash days, and he is still around: find him on senocular.com and on the forums.
:: Copyright KIRUPA 2026 //--