Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding XQuery in Java

I need to retrieve some details from a MusicXML (xml) file in Java. I managed to read xml files in java - but through a web service (where I have to be online, connected to internet when I'm running my code). I came across XQuery where you can easily extract info from an XML file. But I need to embed XQuery in java (i.e. use xquery in java code), precise without using a web service. Is there any possible way, how I can embed XQuery (reading info from XML file), in java code?

Greatly appreciate any insight, suggestions and ideas. Many thanks in advance

like image 519
Dolphin Avatar asked Jun 28 '10 23:06

Dolphin


3 Answers

How about SAXON XSLT & XQuery processor.SAXON

like image 175
kadalamittai Avatar answered Nov 11 '22 11:11

kadalamittai


Use XQJ (XQuery for Java API). There are various tutorials for using XQJ on the web.

like image 25
Chadwick Avatar answered Nov 11 '22 12:11

Chadwick


Try using oracle XQuery for Java (XQJ API).

http://orafmwsoa.blogspot.com/2014/06/running-xquery-from-java-applications.html http://docs.oracle.com/cd/E16655_01/appdev.121/e17604/adx_j_xqj.htm

like image 38
user3758328 Avatar answered Nov 11 '22 12:11

user3758328