18 Jul
2013
18 Jul
'13
3:57 a.m.
Hi, I am trying to use BaseX and Java. The Following is my XQuery that I am trying to run. I am using Java to run it. String query = "let $up := <food id=\"3\">\n" + " <name>Belgian Waffles</name>\n" + " <price>5.95</price>\n" + " <calories>650</calories>\n" + " </food>"; query+= "for $doc in collection('factDB/xmlDocs') for $myVar in $doc/breakfast[@menuId='3']/food[@id='6'] return insert node $up as last into $myVar"; session.execute(query); } The error I get is the following: org.basex.core.BaseXException: Stopped at line 1, column 7: Unknown command: declare. Try HELP. Can you please help me to resolve this issue. Thanks Sree Aurovindh Viswanathan