Flash Components      Flash Menu      Flash Gallery      Flash Slideshow      FLV Player      Flash Form      MP3 Player      PhotoFlow      Flash CMS      3D Wall      Flash Scroller

Flash / AS

Silverlight

WPF

ASP.net / PHP

Photoshop

Forums

Blog

About

 


FlashComponents
  Galleries
  Slideshows
  Menus
  Design & Effects
  Audio & Video
  User Interface
  Templates

 

 

 

 


Introduction to XML in Flash
       by senocular

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>
<from>Peter</from>
<body>I love you!</body>
</letter>

If you're familiar with HTML, you can see the similarities. Like HTML, just from looking at the above text, it's fairly easy to see what information the file holds and how it's laid out. Just like the italic tags <i></i> may encase italic text in HTML, the ambiguous <to></to> tags above surround Sandy to indicate that Sandy is to whom this particular letter (<letter></letter>) is to be sent.

The information enclosed in tags in XML (and HTML) allow for a hierarchical structure of information. For instance, above, we knew that Sandy is getting the letter because "Sandy" was placed within the opening and closing to tags and the to tags were in between the opening and closing letter tags.

In the file-folder analogy, the letter tag represents a folder which contains 3 other folders to, from and body, all which are representative of the contents or aspects of a letter. Each one of those folders contains the given text respective to their types (i.e. to, from or body) which could be considered the files of those folders.

The contents of an XML document, tags and information within those tags, are considered to be nodes. These nodes are the basic building blocks XML defining all that it is. There are two types of nodes at play in the letter example: elements and text nodes. Letter, to, from and body are elements; Sandy, Peter and I love you! are text nodes.


 


kirupa.com's fast and reliable hosting provided by Media Temple. flash components
The Text Animation Component for Flash CS3
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.
Check out our high quality vector-based design packs! Flash Effect Components
flash menus, buttons and components Digicrafts Components
The best flash components ever! Entheos Flash Website Templates
Buy and sell FLAs at Ultrashock! Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Purchase & Download Flash Components flash components
Learn how to advertise on kirupa.com