jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashok121 <ashok...@gmail.com>
Subject Re: Fwd: Need help regarding importXML - IMPORT_UUID_COLLISION_REPLACE_EXISTING!
Date Thu, 10 Feb 2011 14:00:42 GMT

Below is my initial post:

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 :   10   ). 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. 
http://jackrabbit.510166.n4.nabble.com/file/n3299140/FifthHop.java
FifthHop.java 
http://jackrabbit.510166.n4.nabble.com/file/n3299140/configure.xml
configure.xml 
-- 
View this message in context: http://jackrabbit.510166.n4.nabble.com/Fwd-Need-help-regarding-importXML-IMPORT-UUID-COLLISION-REPLACE-EXISTING-tp3299124p3299140.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message