Thanks David!

 

Gary

 

From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of David Lee
Sent: Monday, October 15, 2012 12:57 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Update node value syntax

 

Dont use concat in the first place

 

 

Try this:

{xdmp:node-replace($r/searchPath, 

   <searchPath>{ fn:replace($r/searchPath/text(), $find,
$repl)}</searchPath> )

)}

 

 

----------------------------------------------------------------------------
-

David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224

Cell:  +1 812-630-7622
www.marklogic.com <http://www.marklogic.com/> 

 

From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Gary Larsen
Sent: Monday, October 15, 2012 12:56 PM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Update node value syntax

 

Hi,

 

I'm attempting to update a node with the following syntax:

 

{xdmp:node-replace($r/searchPath, 

   concat('<searchPath>', fn:replace($r/searchPath/text(), $find, $repl),
'</searchPath>')

)}

 

but get the error:

 

Description: XDMP-ARGTYPE: (err:XPTY0004)
xdmp:node-replace(fn:doc("/db/netvisn/save/i4C3CC6CC7F6C404A943E89FC9DCF77FC
.xml")/*:content/*:lookupInfo/*:searchPath,
"<searchPath>CAMID(&quot;default:u:authid=4001917375&quot;)/folde...") --
arg2 is not of type node()

 

How do I convert the results of the concat() to a node?

 

Thanks,

Gary

 

_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to