Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
If you're new to XML let me provide a brief description of the most common aspects of XML data. If you're already familiar with XML you can skip over to the next movie and start learning about Flash ActionScript classes for working with XML. As I stated previously, XML is just a fancy text file, like this one here. However, where you may normally use a text file you can instead use XML, which will allow you to store information in a more useful format. XML data is stored 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 as a text write-out of a hierarchical file system. This file system stores only textual information. This example here, notice, is organized by tags. This is a letter tag that contains the to, letter to tag and the letter from tag and then I have the body of the letter. Notice inside the body tag: I love you! So notice that the contents of the letter is stored inside the letter tag and includes the sender, the recipient and the content itself. Here's a more detailed but perhaps more useful and descriptive example. Here I have an XML file which describes a breakfast menu. Notice nested within the food tag are food items with a name, for example, Belgian Waffles, the price, 5.95, a description - two of our famous Belgian Waffles with plenty of real maple syrup - as well as calories. Notice I have another food tag below that. Let's go ahead and clean this up a little bit. This time Strawberry Belgian Waffle, with price, description and calories. A third food item in my breakfast menu is the Berry-Berry Belgian Waffle, prices, descriptions, calories, like I had for the other food items. And I can continue going down the list to get other food items such as French Toast, home style breakfast, and so on. Notice that the XML file ends with the closing breakfast menu tag, so it starts with the opening breakfast menu tag and closes with this closing breakfast menu tag. Very similar to HTML. Let's go back to the top of this XML file here. Now generally a single set of XML data is known as an XML document. In XML format, data is organized into elements using a hierarchical structure. In this menu example these elements included food items and for each food item the name, price, calories and a description. Now every XML document has a single element as the top level or the main item. In this example this is the breakfast menu tag as I mentioned previously. Inside this root element there may be a single piece of information, although there are more likely to be other elements which, in turn, contain other elements and so forth. In this example the food items are at the next level of organization and finally they price and the calories plus the description. Notice that each element is distinguished by two tags: the element's name wrapped in an angle bracket; you can also refer to these as less than and greater than signs, right here, the breakfast menu. The opening tag indicating the start of the element has the element name. The closing tag, which marks the end of the element has a forward /before the element's name, right here, for example, the name of my food item, Belgian Waffles. There's the opening tag, the closing tag has the forward /right before the name of the element. In addition to the element's content contained between the opening and closing tags, an element can also include other values. These are known as attributes; very similar to ActionScripting and easier to find in the element's opening tag. For example, this XML element defines a single attribute named length with the value of 4.9. Each XML element has content which is either a single value or one or more XML elements, or nothing for an empty element. To learn more about XML beyond the layman's terms and definitions that I've provided here you can visit these two websites: www.xml.com, or www.w3.org /XML /. Let's now proceed on to the next movie and learn about the various ActionScript classes for working with XML data.
| Course: | Adobe Flash ActionScript 3.0 for Designers |
| Author: | James Gonzalez |
| SKU: | 34060 |
| ISBN: | 1-935320-82-3 |
| Release Date: | 2009-11-09 |
| Duration: | 9.5 hrs / 101 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |