background preloader

XML

Facebook Twitter

XML Basics. By Blue_Chi | Flash CS3 | ActionScript 3.0 | Beginner Using XML is one of the best ways for structuring external content in a logical format that is easy to understand, process, and update.

XML Basics

This tutorial will teach you the basics on how to load and process XML in Flash using ActionScript 3.0. You are assumed to have basic knowledge of ActionScript in order to follow this tutorial. This tutorial is for working with XML in ActionScript 3.0. If you would like to learn how to work with XML in ActionScript 1/2 then please review our previous Flash XML tutorial.

Our tutorial will be divided into the following short sections: What is XML? What is XML? XML stands for Extensible Markup Language, it is a markup language used to structure data logically using tags that look very similar to HTML. <? As you just saw, XML makes it possible for authors to create and name their tags in whatever form they choose as long as they adhere to the basic rules of the language. Writing an XML File for Flash school. Embedded HTML tags inside XML. Using XML in Flash CS3/AS3 - Page 1. By kirupa | 17 July 2007 One of the major changes in AS3 is how you deal with XML content.

Using XML in Flash CS3/AS3 - Page 1

While a lot of similarities carried over from the AS2 days, there are new time-saving niceties in AS3 that make working with XML files easier. One of the introductions is Ecmascript for XML, known as E4X for short. Using XML in Flash CS3/AS3 - Page 7. By kirupa | 17 July 2007 In the previous page, you learned how to filter your data based on conditions that you set.

Using XML in Flash CS3/AS3 - Page 7

In all of the previous filtering examples, though, you only filtered your values based on one condition. You can actually have as many conditions as you want, so you can create sophisticated filters for precisely find the data you need. For example, try the following code: function ParseBooks(bookInput:XML):void { trace("XML Output"); trace("------------------------"); var bookList:XMLList = bookInput.Book. When you test your application with the above code, Undaunted Courage will be the only returned result.

Hopefully the previous six pages provided you with enough tools to tackle even the most demanding XML-related tasks. Throughout this tutorial, you used a sample XML file that contained four of my favorite books. Need Help? Share Did you enjoy reading this and found it useful? If you didn't like it, I always like to hear how I can do better next time. Cheers!