jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jzitt...@adobe.com>
Subject Re: Need help regarding importXML - IMPORT_UUID_COLLISION_REPLACE_EXISTING!
Date Thu, 10 Feb 2011 12:51:53 GMT
Hi,

Note that the users@ mailing list is better for questions like these.

On 02/10/2011 01:24 PM, Ashok wrote:
> 2) If the xml value changes I need to update the changed value in
> repository. For this I used:
>     session.importXML("/" , xml,
>       ImportUUIDBehavior.*IMPORT_UUID_COLLISION_REPLACE_EXISTING*);
> *But the above step is adding nodes again rather than replacing the node
> with new values.*

You need to include the UUIDs also in the XML content you're importing, 
otherwise there's no way for the repository to tell which nodes you want 
to overwrite.

     <a jcr:uuid="..."> <b jcr:uuid="..">10</b> <a>

If this is not possible (i.e. you get the XML from some external 
source), you'll need to explicitly implement the logic by which the 
import can tell which existing JCR node corresponds to each incoming XML 
element.

-- 
Jukka Zitting

Mime
View raw message