1 B Why should I use XML?
XML is becoming a standard way for people to export and import data from different systems. Its simplified mark up language make it easy for different systems to read data in, without knowing the exact structure of the data. If the XML data description has been properly created it is possible to add additional information to your XML data files without affecting system that are already using the information.
If you load XML data into flash, an object model will be created that will allow you to easily manipulate and extract the data. The same object model is available to create XML data, and export it to an extenal system.
1 C Why can't I simply load the information from a simple file?
For retrieving information external to the flash file loadvariables might work when loading simple or small amounts of information. Once you have to retreive information where the amount of information changes, or is being created by an external source, you should use XML .
2 XML is fundamental in today's internet. It can be used to replace databases (in certain circumstances) or allow users to syndicate content (very common in today's blog-enabled world).
XML (an abbreviation for "eXtensible Markup Language") is a tag based language, similar to HTML except follows a slightly stricter set of rules. XML tags must have an opening and closing tag to ensure proper nesting. That means that if you had a <p> tag it must be closed with a corresponding </p> tag (or could be closed with the shorthand form of <p />).
Flash has several different ways of sending and receiving XML in order to integrate with other languages, such as ColdFusion, PHP, Perl, ASP, Java, etc. XML packets can sent and received using the XML class by using the load, send and sendAndLoad methods or you can use Flash MX Professional 2004's new XMLConnector to send and receive packets and bind them to other components on the Stage at runtime. |