MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 361

Director scripting reference
Table of Contents

Advertisement

Example
These Lingo statements leave
XML into a list. The element
XMLtext = "<sample> </sample>"
parserObj.parseString(XMLtext)
theList = parserObj.makelist()
put theList
-- ["ROOT OF XML DOCUMENT": ["!ATTRIBUTES": [:], "sample": ["!ATTRIBUTES":
[:]]]]
These Lingo statements set
list. The element
XMLtext = "<sample> </sample>"
parserObj.ignorewhitespace(FALSE)
parserObj.parseString(XMLtext)
theList = parserObj.makelist()
put theList
-- ["ROOT OF XML DOCUMENT": ["!ATTRIBUTES": [:], "sample": ["!ATTRIBUTES":
[:], "!CHARDATA": " "]]]
These Lingo statements leave
given XML. There is only one child node of the
tag.
<sub>
XMLtext = "<sample> <sub> phrase 1 </sub></sample>"
parserObj.parseString(XMLtext)
theList = parserObj.makeList()
put theList
-- ["ROOT OF XML DOCUMENT": ["!ATTRIBUTES": [:], "sample": ["!ATTRIBUTES":
[:], "sub": ["!ATTRIBUTES": [:], "!CHARDATA": " phrase 1 "]]]]
These Lingo statements set
now two child nodes of the
XMLtext = "<sample> <sub> phrase 1 </sub></sample>"
gparser.ignoreWhiteSpace(FALSE)
gparser.parseString(XMLtext)
theList = gparser.makeList()
put theList
-- ["ROOT OF XML DOCUMENT": ["!ATTRIBUTES": [:], "sample": ["!ATTRIBUTES":
[:], "!CHARDATA": " ", "sub": ["!ATTRIBUTES": [:], "!CHARDATA": " phrase 1
"]]]]
ilk()
Usage
ilk(object)
ilk(object, type)
Description
Function; indicates the type of an object.
ignoreWhiteSpace()
<sample>
ignoreWhiteSpace()
now has a child containing one space character.
<sample>
ignoreWhiteSpace()
ignoreWhiteSpace()
tag, the first one being a single space character.
<sample>
set to the default of
has no children in the list.
to
and then parse the given XML into a
FALSE
set to the default of
tag and only one child node of the
<sample>
to
and parse the given XML. There are
FALSE
and parse the given
TRUE
and parse the
TRUE
ilk()
361

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents