Hi,
If you just need to replace the value, you can try:
let $values := /root/element1/company/text()
for $value in $values
return xdmp:node-replace($value, text {"MarkLogic"})
If your node is with namespace, you can use *:company to search them or
declare the namespace...
John
On Wed, Nov 9, 2011 at 1:08 AM, Singh, Gurbeer <
[email protected]> wrote:
> Hi ,****
>
> ** **
>
> I need to do a bulk update for a element node value in ML data base. ****
>
> ** **
>
> Let’s say current structure of XML is ****
>
> ** **
>
> <root>****
>
> <element1>****
>
> <fname>Alex </fname>****
>
> <lname>smith</lname>****
>
> <sex>M</sex>****
>
> <company>Morgan Stanley</company>****
>
> </element1>****
>
> </root>****
>
> ** **
>
> ** **
>
> I need to update company value to *MarkLogic* for entire xml in DB****
>
> ** **
>
> I am aware of xdmp:node-replace****
>
> ** **
>
> Using node-replace this is possible, but we need pass node also with
> namespace. In my case I need to do this programmatically with some
> different case****
>
> ** **
>
> So was just exploring if we have something else also****
>
> ** **
>
> ** **
>
> ** **
>
> ~Gubreer****
> ------------------------------
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the
> opinions or views contained herein are not intended to be, and do not
> constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall
> Street Reform and Consumer Protection Act. If you have received this
> communication in error, please destroy all electronic and paper copies and
> notify the sender immediately. Mistransmission is not intended to waive
> confidentiality or privilege. Morgan Stanley reserves the right, to the
> extent permitted under applicable law, to monitor electronic
> communications. This message is subject to terms available at the following
> link: http://www.morganstanley.com/disclaimers. If you cannot access
> these links, please notify us by reply message and we will send the
> contents to you. By messaging with Morgan Stanley you consent to the
> foregoing.
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general