FLWOR with BDB XML - Java binding -
08-11-2006
, 01:15 PM
Hi,
I am new to BDB XML and I am trying to use XQuery FLWOR read from a
file in the Java program to perform the query. I am using the getting
started examples of Java for the data.
However, I keep getting the error:
, line 1, column 42
Exception in thread "main" com.sleepycat.dbxml.XmlException: Error:
Error in XQu
ery expression:
syntax error, unexpected "for", expecting "<end of file>"
[err:XPST0003]
, line 1, column 42, errcode = XPATH_PARSER_ERROR
at
com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_query __SWIG_0(Native Met
hod)
at com.sleepycat.dbxml.XmlManager.query(XmlManager.ja va:544)
at com.sleepycat.dbxml.XmlManager.query(XmlManager.ja va:242)
at ch.inform.bdb.FLOWRXQuery.doQuery(FLOWRXQuery.java :40)
at ch.inform.bdb.FLOWRXQuery.main(FLOWRXQuery.java:14 6)
My query is
for $doc in collection('simpleExampleData.dbxml')
where $doc/product/item[text()=\"Lemon Grass\"]
return $doc/product
It seems to run fine with the shell.
Can anyone please point me to the reason for this? Any working examples
will be very helpful.
Thanks,
Sonal |