jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashok <ashok...@gmail.com>
Subject Need help regarding importXML - IMPORT_UUID_COLLISION_REPLACE_EXISTING!
Date Thu, 10 Feb 2011 12:24:12 GMT
 Hello Everyone,

I am using JackRabbit-2.2.2 (jackrabbit-standalone-2.2.2.jar.). My
requirement is as below:

1) Importing a xml file to repository (eg : <a> <b>10</b> <a> ). I
have used


    session.importXML("/" , xml,
      ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);

This step is fine.

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.*

I browsed for this and understood the node that I am trying to replace,
needs to be referenceable. Hence I have added:

node.addMixin("mix:referenceable");

to all my nodes in my example. But still nodes are not getting replaced and
it is creating new nodes in repository.

I have attached the Java program and xml file which I am trying with this
mail.

Could anyone please provide me some pointers regarding this issue.

-- 
Cheers,
Ashok
+91-9600117508



-- 
Cheers,
Ashok
+91-9600117508

Mime
View raw message