简体   繁体   中英

XQuery Update Facility / Replace node

Is a "replace node..." statement anytime equal to an atomic removal of a node (with it's subtree) and an insertion of the content to replace with at the same place?

That is considering we have a DOM-Implementation, in order to support replace-operations is it save to assume the above statement or is something like this also possible (in case of replacing the "foo"-element with a "blabla"-element):

original tree:

  • root
    • foo
      • bar
      • baz

modified tree:

  • root
    • blabla
      • bar
      • baz

只需构造一个包含<foo>内容的节点<blabla>

replace node /foo with <blabla>{/foo/*}</blabla>

您也可以使用rename node来保留后代节点结构。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM