Chapter 20: Using Xtras; Using The Xml Parser Xtra - Adobe 65036570 - Director - PC User Manual

User guide
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

Chapter 20: Using Xtras

Using the XML Parser Xtra

The XML Parser Xtra lets Adobe
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 JavaScript™
syntax or convert the contents to a script 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
, and
. HTML tags also describe how information appears on the screen. XML, on the other hand, consists of
P
BODY
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 the 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. For example, 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 on the Internet for understanding, creating, and editing XML. 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/
Using XML parser objects
The XML Parser Xtra lets Director developers access the nodes of an XML document. A node can be a tag (similar
to an HTML tag, also called an element), character data (text that does not appear inside the angle brackets of a tag),
or a processing instruction (a special type of tag that passes data to the parsing application for special processing). You
can extract information from the XML document by looking at its nodes with Lingo or JavaScript™ syntax. This
access to XML data lets users incorporate XML documents into their movies and selectively extract data from
the documents.
®
®
Director
movies read, parse, and use the contents of Extensible Markup
402
,
TITLE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents