selectSingleNode Method

Searches for a child node under the caller’s node.

selectSingleNode(queryString)

 

Parameter

Description

queryString

A path to the requested node

Return Value

If the node was found, the return value is the node object (of type SGNode).

Otherwise, the return value is null.

Remarks

The current implementation supports simple queries where the full path to the node is given. Future versions will support more advanced features of XPath.

Example

Finds “myPoly” node, under “myGroup” node, under the caller’s node:

var myPoly = node.selectSingleNode("myGroup/myPoly");

Finds directly under the root node “myLabel” node:

var myLabel = globe.root.selectSingleNode("myLabel");