[MarkLogic Dev General] xdmp and update type problem

erinemiller at comcast.net erinemiller at comcast.net
Sun Oct 12 21:30:02 PDT 2008

Hello All,
I'm new to MarkLogic and I have a question about updating a document node.  Here's my problem:
I'm going through the nodes in my document to find a specific node.  Here's what my XPath looks like: 
   //dict/dict[preceding-sibling::key[1] = "Tracks"]/dict/string[preceding-sibling::key[1]]
My XML is like:
      < key>Track ID</key>
That should return a node that looks like:
So it's technically returning an element node--I've also tried xdmp:node-kind and that gives me "element."

But when I try to update, I get this error:
[1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) xdmp:node-replace(xs:untypedAtomic("Air"), <string>Air2</string>) -- arg1 is not of type node()
It seems like instead of getting back:
I'm actually just getting: 
Which I can't use to update the node since it isn't a node. 
Can anyone point me in the right direction?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20081013/49269294/attachment.html

More information about the General mailing list