
XML.ignoreWhite Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
931
See Also
XML.getBytesLoaded(), XML.onLoad(), XML.load(), XML.sendAndLoad()
XML.hasChildNodes() Method
check if a node has any descendants
Flash 5
theNode.hasChildNodes()
Returns
A Boolean: true if theNode has any children, false if it does not.
Description
The hasChildNodes() method indicates whether any node hierarchy extends from theNode,
where
theNode can be an XML or XMLnode instance. The hasChildNodes() method is
synonymous with the comparison expression:
theNode.childNodes.length > 0
If theNode contains no subnodes, hasChildNodes() returns false.
Example
We can use hasChildNodes() to determine whether to operate on a node during node
processing. For example, here we remove the nodes below the first child of a document
until the first child has no more children:
while (myDoc.firstChild.hasChildNodes()) {
myDoc.firstChild.firstChild.removeNode();
}
See Also
XML.childNodes
XML.ignoreWhite Property
determines whether to ignore whitespace nodes during XML parsing
Flash 5.0.41.0
read/write
xmlDoc.ignoreWhite
Description
The Boolean ignoreWhite property dictates whether to discard text nodes containing only
whitespace during the parsing process. The default value is
false (don’t throw away
whitespace nodes). This is an instance-wide setting