Figaro - The XML Database for the .NET Framework
Renaming Nodes
Send Feedback
Figaro - the XML Database for the .NET Framework
Figaro - The XML Database for the .NET Framework

You can rename a node using rename node query. For example, given the document named "mydoc.xml" in container "con.dbxml":

CopyXML
<a>
   <b1>first child</b1>
   <b2>second child</b2>
   <b3>third child</b3>
</a>

You can rename node b3 to z1 using the following query:

Copy 
rename node doc("dbxml:/con.dbxml/mydoc.xml")/a/b3 as "z1"

The selection expression that you provide must be a non-updating expression, and the result must be non-empty and consist of a single element, attribute, or processing instruction node.

Figaro - The XML Database for the .NET Framework

Copyright © 2008-2009 Endpoint Systems. All rights reserved.