...
Code Block | ||
---|---|---|
| ||
$XmlRepository.Query('let $nodeValue := fn:parse-xml-fragment($nodeValue)' + 'for $record in Relation[Id=$id]/RepHistory/RepHistoryRecord[InstanceId=$instanceId] return ' + '(delete node $record)', { id : relationId, instanceId : $Xml.Evaluate('SelectedHistory/Id'), nodeValue : $Xml.SelectSingle('.').InnerXml() }); |
Info |
---|
If you want to query the database of a process, you can use the collection keyword. You have to give the name of the database which is a GUID. For process databases, you can have that GUID by $Instance.ProcessId. |
Example
Code Block | ||
---|---|---|
| ||
Querying process database var results = $XmlRepository.Query('collection("49551ed3-6229-408a-aaaa-eb510463acad")//Customer[Id=$id]', { id : $Xml.Evaluate('CustomerId') }); $Xml.InnerXml( 'Customers', results[0].Evaluate('Id') ); |