Overview
Loads xml content to current node from $XmlRepositoryvoid myXml.Load(xquery: string)
void myXml.Load(xquery: string, parameters: object)
void myXml.Load(xquery: string, parameters: object, collection: string)
Arguments
Remarks
This method loads only matched elements with node xml scheme. Non-matching elements are ignored.
Registered namespace prefixes are implicitly declared while performing xquery.
If the resulting query returns the same node name as the current node name; the current node inner xml is replaced with the result, otherwise resulting nodes are processed as child nodes to current node.
For more xquery details please refer to XQuery standard and XQuery Update standard
Example
Save & Load
$Xml.Save('','Settings'); // save current node $Xml.Load('Settings/*'); // load current node contents
Example
Loading a simple result to current node
$Xml.Load('Person[Id=1]');
Example
Loading basic transformed result to current node
$Xml.Load('for $c in //Person ' + 'where $c/Surname ' + 'return ' + ' <Person> ' + ' <Name>{ $c/Name }</Name> ' + ' <Person> ');