Do you use XUpdate to update documents? If so, you can try this query:
<xupdate:modifications version="1.0"
xmlns:xupdate="http://www.xmldb.org/xupdate">
<xupdate:variable name="var" select="/a/*"/>
<xupdate:remove select="/a/*"/>
<xupdate:append select="/a">
<b></b>
</xupdate:append>
<xupdate:append select="/a/b">
<xupdate:value-of select="$var"/>
</xupdate:append>
</xupdate:modifications>
Regards,
Natalia
On Sat, Jul 11, 2009 at 10:34 AM, Tak-po Li<[email protected]> wrote:
>
> I am new with xindice. What is the best way to insert/remove a node level?
>
> As an example, make
> <a>
> <m>
> ....
> </m>
> </a>
> into
> <a>
> <b>
> <m>
> ....
> </m>
> </b>
> </a>
> and vice verse.
>
> Thanks,
>
> Tak
>
>