Geert Thanks for the reply ! But it is not simply node-replace. I need to 
replace the entire content XML except one elements. For example I have one 
test.xml already there  into ML as
 <sample> 
                <sample1>A</sample1> 
                <sample2>B</sample2> 
                <sample3>C</sample3> 
                <sample4>D</sample4> 
                <sample5>E</sample5> 
                <sample6>F</sample6> 
        </sample> 
Next time I am going to ingest the following file with the same uri. I 
need to get the value of <sample4> from the older (already present into 
ML) text.xml , add this to the new one coming and the insert to ML with 
same URI within single transaction. 
<sample> 
                <sample1>A</sample1> 
                <sample2>A</sample2> 
                <sample3>A</sample3> 
                <sample5>A</sample5> 
                <sample6>A</sample6> 
        </sample> 

I guess I am clear with the example

Thanks & Regards
Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
Geert Josten <[email protected]>
To:
General MarkLogic Developer Discussion <[email protected]>
Date:
06/15/2011 03:47 PM
Subject:
Re: [MarkLogic Dev General] Node Replace
Sent by:
[email protected]



Hi Abhishek,
 
I think you are looking for xdmp:node-replace: 
http://developer.marklogic.com/pubs/4.2/apidocs/UpdateBuiltins.html#xdmp:node-replace
 
You can find functions to do inserts of new elements and things like that 
on that page as well..
 
Kind regards,
Geert
 
Van: [email protected] [
mailto:[email protected]] Namens Abhishek53 S
Verzonden: woensdag 15 juni 2011 11:06
Aan: General MarkLogic Developer Discussion
Onderwerp: [MarkLogic Dev General] Node Replace
 

Hi All 
I have my content XML as follows 
        <sample> 
                <sample1>A</sample1> 
                <sample2>B</sample2> 
                <sample3>C</sample3> 
                <sample4>D</sample4> 
                <sample5>E</sample5> 
                <sample6>F</sample6> 
        </sample> 
with all the possible hierarchies. The document is already present in 
marklogic repository. If the same document is going to be updated I need 
to replace the entire  old content XML with the new one except the element 
<sample5>. What is best possible way to achieve this in a single 
transaction. 


It is like getting the <sample5> element value from the older one setting 
to the new coming content XML and the ingesting to marklogic but the 
problem is there for on the fly XML modification. 

Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to