Using The Xml Parser Xtra; About Xml - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

The XML Parser Xtra lets Macromedia Director MX movies read, parse, and use the contents of
Extensible Markup Language (XML) documents. Using the XML Parser Xtra requires that you
understand the structure and content of the documents you are parsing. You can then access the
XML document's contents through Lingo or convert the contents to a Lingo list that is
meaningful to you and your movie. After your movie has read an XML document, it can perform
actions that you define based on the contents of the document.
For example, an XML document might describe the structure of a molecule for an educational
chemistry application. After the movie has parsed the XML that describes the molecule, it can use
that information to draw an accurate visual representation of the molecule on the screen. In this
case, the movie must be programmed to know ahead of time that the XML document describes a
molecule and not a grocery list, in order to make logical use of it.

About XML

XML is similar to HTML in that it uses markup tags to define content. However, HTML has
predefined tags that you can use to format any data. Any application that reads HTML must
understand the meaning of tags such as
information appears on the screen. XML, on the other hand, consists of a set of rules that let you
define custom tags and the type of data they can contain, and it has no visual component. With
XML, there is no predefined way to display any given type of data such as molecular structures or
grocery lists. An XML document is merely a container for the data.The Director developer, by
knowing what kind of data the XML document contains, can make intelligent decisions about
what the Director movie should do with the information.
One key advantage of XML over a regular text document is that XML is not order-dependent. If
an application refers to the third item in a line of data, inserting new data or making subsequent
changes to the way the data is produced could cause the application to fail. With XML, you
can refer to the individual data components by name. If you insert a new chunk of data before
the one in use, the name is still valid. Existing code continues to work, and the newly inserted
data is ignored.
There are many sources of information for understanding, creating, and editing XML on the
Internet. The following websites offer useful information about XML:
www.xml.com
www.ucc.ie/xml/
www.w3.org/TR/REC-xml
www.w3.org/DOM/
CHAPTER 22

Using the XML Parser Xtra

,
, and
. HTML tags also describe how
TITLE
P
BODY
Using the XML Parser Xtra 543

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents