Object Properties for Nodes in Custom Functions

The following object properties can be used in custom JavaScript functions for any node, such as nodes passed as parameters or the current context:

Example Using Node Properties

The following example uses the current context node and node properties to find a node named “PickMe”.

var myNode;
myNode = this.current //the current context node
for (myNode = myNode.firstChild; myNode != null; myNode = myNode.nextSibling) {
     if (myNode.localName == “PickMe”) {
         return true;
     }
}
return false;

Custom functions also have access to the current context node of the map using the standard "this” variable. For more information, see Object properties for the current context.