AppendChild¶
Appends a new child to the specified XPath location and executes the provided callback function on the newly created node before inserting it into the DOM. Returns the appended new node.
1 |
|
Appends a new child to the specified XPath location and executes the provided callback function on the newly created node before inserting it into the DOM. Returns the appended new node.
1 |
|
Parameters¶
string xpath
XPath of the node to which the child will be appended.
(node: Xml) => any callback
Callback function to be executed on the new node.
Returns¶
The newly appended Xml
node. The newly appended Xml
node.
Remarks¶
This method creates a new node and its child nodes according to the XML schema definition. An error is thrown if the XML schema definition is not found.
A qualified node path can be specified in the xpath
argument when required. For example: Customer/Orders/Order
.
The callback function is executed before the node is appended to the DOM tree. Monitoring events such as Xml.Bind
or Xml.Live
are not triggered within the callback function.
The function returns the created node after it has been appended to the DOM tree.
The callback function is invoked before the document is modified.
Appending a node:¶
1 2 |
|
This method creates a new node and its child nodes according to the XML schema definition. An error is thrown if the XML schema definition is not found.
A qualified node path can be specified in the xpath
argument when required. For example: Customer/Orders/Order
.
The callback function is executed before the node is appended to the DOM tree. Monitoring events such as Xml.Bind
or Xml.Live
are not triggered within the callback function.
The function returns the created node after it has been appended to the DOM tree.
The callback function is invoked before the document is modified.
Appending a node with a callback:¶
1 2 3 |
|