Using Xml Document Nodes - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

errCode = gParserObject.parseString(member("XMLtext").text)
theList = gParserObject.makeList()
After this code has been executed, the variable
of the XML document, and the variable
information in the document broken into property name and value pairs. All the regular script
methods for sorting and accessing lists can work normally with

Using XML document nodes

The XML document can contain different types of nodes. Each node can contain different kinds
of data, depending on the node type. You should check the node type before accessing its data so
you know what type of data to expect. Nodes are read-only, so you can retrieve the type, but you
cannot set it.
You use Lingo or JavaScript syntax to access the nodes of an XML document. The following table
shows the script terms that refer to nodes and their properties:
Node Script
type
name
child[N]
(N is an integer)
attributeName[N]
(N is an integer)
attributeValue[N]
(N is an integer)
attributeValue[N]
(N is a string)
text
Note: The subfield count exists for any field that is accessible with bracket access. You can specify
whichNode.child.count to find how many children are in the specified node.
422
Chapter 19: Using the XML Parser Xtra
theList
Return value if an element
#element
String representing the name of
the element
The Nth child node of the node;
VOID is returned if no Nth child
exists or there is a script error
String representing the name of
the Nth attribute;
VOID is returned if no Nth
attribute exists or there is a
script error
String representing the value of
the Nth attribute;
VOID is returned if no Nth
attribute exists or there is a
script error
String representing the value of
the attribute with the name N;
VOID is returned if the node
does not have an attribute
named N or there is a script error
VOID
contains the parsed node structure
gParserObject
is a property list that contains all the
theList
Return value if
text
#text
VOID
VOID
VOID
VOID
VOID
String representing
the character data
contained in this
node
.
Return value if
Processing Instruction
#procInst
String representing the
name of the processing
instruction
VOID
VOID
VOID
VOID
String representing the
data section of the
processing instruction

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents