Synchronization is based on the input nodes and performs the following actions at the specified XPath:
Node comparison is performed using the specified hash function, which returns a unique identifier for each node. If no hash function is specified, the node instance is used for comparison.
Nodes that exist in the input array but not in the current node are automatically created in the current node.
Existing nodes in both the input array and the current node are copied.
Nodes that exist in the current node but not in the input array are removed from the current node. Optionally, a list of removed nodes can be added to the removedNodes parameter.
Synchronizing the contents of "Source" and "Target" nodes¶
Performing an XQuery and merging the results with the current nodes¶
1 2 3 4 5 6 7 8 910111213141516
$Xml.SelectAll('Standards/Standard',function(){varquestions=$XmlRepository.QueryXml('for $q in InternalAudit//Question\ where $q/Standards/Standard/Standard=$standard and $q/Departments/Department=$department\ return\ <Question>\ { $q/Id }\ { $q/Criteria }\ { $q/Expectation }\ </Question>',{standard:this.Evaluate('Standard'),department:$Xml.Evaluate('Department')});this.Sync('Questions/Question',questions,function(){returnthis.Evaluate('Id');});});
Synchronization is based on the input nodes and performs the following actions at the specified XPath: - Node comparison is performed using the specified hash function, which returns a unique identifier for each node. If no hash function is specified, the node instance is used for comparison. - Nodes that exist in the input array but not in the current node are automatically created in the current node. - Existing nodes in both the input array and the current node are copied. - Nodes that exist in the current node but not in the input array are removed from the current node. Optionally, a list of removed nodes can be added to the removedNodes parameter.