You are here: Reference > JavaScript > client-side > xml handling > properties > expandEntityReferences (NodeIterator, TreeWalker)
expandEntityReferences property (NodeIterator, TreeWalker)
9 | ||||
Returns a Boolean value that indicates whether the children of entity reference nodes are visible to the NodeIterator or TreeWalker object.
Note: The TreeWalker and NodeIterator objects and their expandEntityReferences properties are supported in Internet Explorer from version 9.
You can set this property by the fourth parameter of the createNodeIterator or createTreeWalker method.Syntax:
You can find the related objects in the Supported by objects section below.
This property is read-only.
Possible values:
Boolean that indicates the expansion state.
One of the following values:
The children of entity reference nodes are hidden to the NodeIterator or TreeWalker object. | |||||||
The children of entity reference nodes are visible to the NodeIterator or TreeWalker object. |
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the expandEntityReferences property:
|
||||
<head> <script type="text/javascript"> function TestExpandEntityReferences () { if (document.createTreeWalker) { var walker = document.createTreeWalker (document.body, NodeFilter.SHOW_ALL, null, true); if (walker.expandEntityReferences) { alert ("The children of entity reference nodes are visible to the TreeWalker."); } else { alert ("The children of entity reference nodes are hidden to the TreeWalker."); } } else { alert ("Your browser does not support the createTreeWalker method!"); } } </script> </head> <body> <button onclick="TestExpandEntityReferences ()">Test expandEntityReferences property</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments