Skip to Main Content
Learning ActionScript 3.0, 2nd Edition
book

Learning ActionScript 3.0, 2nd Edition

by Zevan Rosser, Rich Shupe
October 2010
Beginner content levelBeginner
453 pages
15h 52m
English
O'Reilly Media, Inc.
Content preview from Learning ActionScript 3.0, 2nd Edition

Chapter 14. XML

IN THIS CHAPTER

Understanding XML Structure

Creating an XML Object

Using Variables in XML

Reading XML

Writing XML

Deleting XML

Loading External XML Documents

Sending to and Loading from a Server

An XML-Based Navigation System

What’s Next?

XML, which stands for Extensible Markup Language, is a structured, text-based file format for storing and exchanging data. If you’ve seen HTML before, XML will look familiar. Like HTML, XML is a tag-based language. However, it was designed to organize data, rather than lay out a web page. Instead of a large collection of tags that define the language (as found in HTML), XML is wide open. It starts with only a handful of preexisting tags that serve very basic purposes. This freedom allows you to structure data in a way that’s most efficient for your needs.

In the past, traversing and working with XML within ActionScript has not been the most pleasant or efficient of experiences. Fortunately, E4X (which stands for ECMAScript for XML), is a part of ActionScript 3.0. E4X is the current standard for reading and writing XML documents and is maintained by the European Computer Manufacturers Association. It greatly reduces the amount of code and hoop-jumping required to communicate with XML. It allows you to treat XML objects like any other object with familiar dot syntax, and provides additional shortcuts for traversing XML data. You can use ActionScript’s E4X implementation to create XML inside a class or the Flash timeline or, more commonly, load ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning ActionScript 3.0

Learning ActionScript 3.0

Rich Shupe, Zevan Rosser
ActionScript 3.0 Cookbook

ActionScript 3.0 Cookbook

Joey Lott, Darron Schall, Keith Peters
ActionScript 3.0 Bible

ActionScript 3.0 Bible

Roger Braunstein

Publisher Resources

ISBN: 9781449398705Supplemental ContentErrata Page