User Guide

XML class 187
XML.ignoreWhite
Availability
Flash Media Server 2.
Usage
my_xml.ignoreWhite
XML.prototype.ignoreWhite
Parameters
boolean A Boolean value.
Description
Property; the default setting is false. When set to true, text nodes that contain only white
space are discarded during the parsing process. Text nodes with leading or trailing white
spaces are unaffected.
Usage 1: You can set the
ignoreWhite property for individual XML objects, as shown in the
following code:
my_xml.ignoreWhite = true;
Usage 2: You can set the default ignoreWhite property for XML objects, as shown in the
following code:
XML.prototype.ignoreWhite = true;
Example
The following example loads an XML file with a text node that contains only white space; the
foyer tag comprises 14 space characters. To run this example, create a text file named
flooring.xml, and copy the following tags into it:
<house>
<kitchen> ceramic tile </kitchen>
<bathroom> linoleum </bathroom>
<foyer> </foyer>
</house>