Friday, February 4, 2011

eXistdb-error-1:” XQuery update expressions can not be applied to in-memory nodes”

when i am trying to update values in existdb i faced the following error....


I Spent time for a day trouble shoot this error but this simply solved by by community friend mr Freinsten….i know value of this time so be aware avoid this mistake in your coding….

In XQuery, Usually we use doc() function for retrieving data from db. So I mentioned that where the values to be update using doc(). Here I use the following code for insert a Node into destination xml.

‘ let $upd-value := update insert Insert into source.xml into doc('http://localhost:8080/exist/rest/db/test/source.xml') ’

But this code raises above error after freiston suggestion I found my mistake am using absolute path instead of relative path. So use the following code for update
When I am load a document through eXist's REST interface, it's loaded as
an in-memory node, and, as the error says,’ you can only do XQuery
updates to database nodes’.
‘ let $upd-value := update insert Insert into source.xml into doc('/db/test/source.xml') ‘
Note: All your problems on eXistdb you can find solution in eXist open list

No comments:

Post a Comment