Thanks, Natalia, for your in depth answers.  Understanding it would help me,
in my application, to avoid using a deep xml tree.

Thanks again.

Tak

On Tue, Jul 14, 2009 at 2:47 PM, Natalia Shilenkova
<nshilenk...@gmail.com>wrote:

> On Mon, Jul 13, 2009 at 9:53 PM, Tak-po Li<takpo...@gmail.com> wrote:
> >
> >
> > Thanks, Natalia, for your detail explanation.  If I understand it right,
> we
> > use variable Var to point to the portion of the tree that we want to keep
> > and build the new tree with new node B and Var.  Question: Do we create a
> > duplicate tree and delete the old one or just switch the pointers around?
>
> You are absolutely correct in your understanding of how the query
> works. As for the question, this query will duplicate the part of the
> document that is assigned to the variable. It does not seem to be
> possible to move nodes in the document with XUpdate, at least I could
> not figure it out.
>
> It is also possible to read document from database, then to modify it
> using DOM, and finally to save it to database again. In this case you
> can have greater flexibility and can do the same thing as XUpdate
> query in question without copying parts of the document. However, I
> doubt this method will be any better because it would mean serializing
> document and transferring it between client and the server, while
> XUpdate query modifies documents on the server.
>
> Regards,
> Natalia
>
> >
> > Thanks again.
> >
> > Tak
> >
> >
>

Reply via email to