getValue


String getValue (String xpointer)

Returns the value of the matching element or an empty string if there is no value set.

 xpointer The value the first matching element for xpointer will be returned.

Code snippet

Get the text of the first node.

var docElem = "#/1)";
var xptr = "#xpointer(has/*[1]/lt)";
var element = diputree.lookup(docElem,xptr);

var text = diputree.getValue(element);

alert ("the first node has text: " + text);

Example

value example


diputree documentation © 2000 dipu