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
[email protected]
Phone: +1 812-482-5224
Cell: +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>
From: [email protected]
[mailto:[email protected]] 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("default:u:authid=4001917375")/folde...") -- arg2
is not of type node()
How do I convert the results of the concat() to a node?
Thanks,
Gary
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general