getValueAtPath
Get child node value or child node attribute value at path.
The first node at the specified path is returned.
See getChildAtPath for the description of path. The path may end with "?attribute"; in that case, the value of the specified attribute is returned instead.
Observe: Because this method can return null, the following code is incorrect and can throw NullPointerException:
if (tree.getValueAtPath(PATH).equals(VALUE))
{
…
}
Content copied to clipboard
if (VALUE.equals(tree.getValueAtPath(PATH))
{
…
}
Content copied to clipboard
Return
The child node value or the child node attribute value, or null if no such child or attribute.
Parameters
path
The path to the child node.