Hello. I’ve just installed last version of BaseX and have built a Java Client to access it. This is my code:
String query = “insert node <patient>EOEO</patient> into fn:doc(\"MG_USERS/58745896522DFEF.xml\")/vmr”
ClientSession cSes = new ClientSession(URL, PORT, USER, PASS);
ClientQuery cQuery = cSes.query(query);
String res = cQuery.execute();
cQuery.close();
And I’m getting this error:
[BXDB0006] Database path 'MG_USERS/58745896522DFEF.xml' must point to a single document.
I’m pretty sure that there is only ONE document there, since I always execute a DELETE MG_USERS/58745896522DFEF.xml prior of that code you see above. Furthermore, just before executing that code, I check it with a REST call via Internet Explorer and I get just one doc. So I don’t really understand why I get the BXDB0006 error.
If I try the same but with the REST interface instead of Java Client, by using:
<rest:query xmlns:rest=\"http://basex.org/rest\">
<rest:text>
insert node <patient>EOEO</patient> into fn:doc(\"MG_USERS/58745896522DFEF.xml\")/vmr
</rest:text>
I get the same error. Could anybody help me with this, please?.
Thank you and best regards,
C.
Carlos Marcos Lagunar
Health Technical Consultant
Research & Innovation
Valladolid - Spain
es.atos.net