Xml.Bind
Overview
Attaches a change event handler on the specified xpath resulting nodes.
void myXml.Bind(callback: (e:
XmlEvent) => void)
Attaches a change event handler on the specified xpath resulting nodes.
void myXml.Bind(xpath: string, callback: (e:
XmlEvent) => void)
Arguments
(e: XmlEvent) => void callback
Callback function to be executed.
string xpath
XPath of nodes to be attached. If not specified, the current node is selected.
Remarks
This method is only available on the client side scripts like Form scripts.
Bind method only attaches to an already existing nodes. To receive notifications for existing and nodes created in the future, please use Xml.Live method.
Example
Receive an alert for changing a node
var isNameEmpty = $Xml.Bind('//Customer/Name', function() {
alert('Customer name is changed');
});
Example
Receive an alert for any change on current document
$Xml.Bind(function() {
alert( this.LocalName() + ' is changed.');
});
See Also
Copyright © 2010 - 2023 Emakin. All rights reserved.