• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Basic Data Exchange > XML Structured Data

XML Structured Data

Entire books have been written on XML (eXtensible Markup Language) but, for our purposes, it really doesn’t have to be terribly complex. Simply put, XML is a way to store string data in a structured form. That means not only can you store names and values of variables (like URL-encoded text), you also can ascertain descriptive properties of what’s contained. That is, you can find out how many of a particular type of variable is contained. If your XML file contains data for a quiz, for instance, you can structure it so that—once imported—Flash can immediately know how many questions are contained. In addition, Flash can see that one question has three possible answers and another has four. When we were loading URL-encoded text, we pretty much needed to know the structure or use an additional variable for that information. With XML you get a picture of the data as well as the values in the data.

Note

Flash and DTDs

There’s actually more information that XML files can include in the form of a document type description (DTD). These are sort of like a table of contents for what follows. Flash can read the "DOCTYPE" declaration through the XMLDocTypeDecl property, but it can’t parse though all the DTD data. Fortunately, the natural hierarchy structure of XML files will be enough to make our lives easier.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint