User Guide

188 Server-Side ActionScript Language Reference
Create a new Flash document named flooring.fla and save it to the same directory as the XML
file. Place the following code into the main timeline:
// Create a new XML object.
var flooring = new XML();
// Set the ignoreWhite property to true (default value is false).
flooring.ignoreWhite = true;
// After loading is complete, trace the XML object.
flooring.onLoad = function(success) {
trace(flooring);
}
// Load the XML into the flooring object.
flooring.load("flooring.xml");
/* output (line breaks added for clarity):
<house>
<kitchen>ceramic tile</kitchen>
<bathroom>linoleum</bathroom>
</foyer>
</house>
*/
If you change the setting of flooring.ignoreWhite to false, or simply remove that line of
code entirely, the 14 space characters in the
foyer tag are preserved:
...
// Set the ignoreWhite property to false (default value).
flooring.ignoreWhite = false;
...
/* output (line breaks added for clarity):
<house>
<kitchen> ceramic tile </kitchen>
<bathroom>linoleum</bathroom>
<foyer> </foyer>
</house>
*/
NOTE
In Flash Media Server, the output of trace() statements appears in the application log
file and Application inspector.