I want to use XQuery
for fetching data from Xml in java, but I am not getting which Jar I need to add for this. I searched in google lot but haven't got any useful example. For example I got following link:
https://docs.oracle.com/database/121/ADXDK/adx_j_xqj.htm
Then I am not getting jar file mentioned here. Anyone know how to start using XQuery in Java with a simple example will be very helpful. After lot of search I have got this link which is saying Xqjapi.jar
comes with oracle database.
Is there any open source api I can use in Java for using XQuery
?
Well, there is another approach to get the required
JARS
, you need not install oracle database for that. I found the solution in this link,http://orafmwsoa.blogspot.co.at/2014/06/running-xquery-from-java-applications.html
But you need not go through the entire link, what important point to note is, all necessary
JARS
are available from Oracle XQuery for Hadoop implementation.And here is the link,
Oracle XQuery for Hadoop 2.4.1
Just download
Oracle XQuery for Hadoop 4.1.0
and extract and create a normal Java Project with the libraries in path.I tried this example from your link, and it works
With following
JARS
in path,Also another suggestion,
OracleXE112_Win64
and it didn't had the requiredJARS
, XE may be has limited functionality, so try installing different one.If the XML is in filestore, then you need a filestore-based XQuery processor such as Saxon.