Skip to content

GetParent

Returns the parent node of the current node.

1
myXml.GetParent():Xml

Returns

An Xml object representing the parent node.

Remarks

Available only in browser form scripts. In server scripts, select the parent with the .. XPath step instead.

Examples

Read a value from the parent of a changed node in a form script

1
2
3
4
$Xml.Bind('Lines/Line/Quantity', function () {
    var line = this.GetParent();
    console.log(line.Evaluate('Product') + ' quantity changed.');
});

Select the parent node in a server script

1
var line = $Xml.SelectSingle("Lines/Line[Product = 'Pen']/Quantity/..");

See Also