MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual page 546

Table of Contents

Advertisement

You use Lingo to access the nodes of an XML document. The following table shows the Lingo
terms that refer to nodes and their properties:
Node Lingo
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
count
Note: The subfield
whichNode.child.count
Using this XML document as a starting point, the following examples demonstrate how to use
these Lingo terms to access the data within various node levels of the XML structure.
The XML looks like the following example:
<?xml version="1.0"?>
<e1>
<tagName attr1="val1" attr2="val2"/>
<e2>element 2</e2>
<e3>element 3</e3>
Here is some text
</e1>
The following Lingo returns the name of the first XML tag:
put gParserObject.child[1].name
-- "e1"
546
Chapter 22
Return value if an
Return value if text
element
#element
#text
String representing
VOID
the name of the
element
The Nth child node of
VOID
the node;
VOID is returned if no
Nth child exists or
there is a script error
String representing
VOID
the name of the Nth
attribute;
VOID is returned if no
Nth attribute exists or
there is a script error
String representing
VOID
the value of the Nth
attribute;
VOID is returned if no
Nth attribute exists or
there is a script error
String representing
VOID
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
String representing
the character data
contained in this node
exists for any field that is accessible with bracket access. You can specify
to find how many children are in the specified 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-USING DIRECTOR MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx

Table of Contents