Xml.Save

Overview

Saves current node content to $XmlRepository

Array<string> myXml.Save(xquery: string, targetXPath: string)

Arguments

string xquery

Specifies the xquery to save filtered results. If set to null current node outer xml content will be saved.

string targetXPath

Specifies the repository target path. If set to null uses the root path of repository. Path can be seperated by '/' character.

Remarks

Registered namespace prefixes are implicitly declared while performing xquery.

Saving current node content to repository under 'Person' path.

Example

$Xml.Save('', 'Person/' + $Xml.Evaluate('Id'));

Example

Saving child node 'Addresses' to repository.

$Xml.Save('Person/Addresses');

Example

Saving basic transformed result to repository.ts

$Xml.Save('for $c in //Person ' + 'where $c/Surname ' + 'return ' + ' <Person> ' + ' <Name>{ $c/Name }</Name> ' + ' </Person> ');

Example

Saving advanced transformed result to repository.

Example

Saving with conditional processing

See Also

  • XPath+and+XQuery

Copyright © 2010 - 2023 Emakin. All rights reserved.