1

I have an XML file that I want to extract data from using XQuery. So far, the only library I found that allows such thing is MXQuery but the project seems to be abandonned.

Is there any other way to make XQuery work on Android ?

2
  • you could use Saxon Commented Feb 12, 2017 at 20:13
  • Saxon does not seem to be working on Android. Commented Feb 15, 2017 at 8:11

1 Answer 1

1

I have started building an XQuery app months ago. You would enter a query directly in the app and have it evaluated there. I was thinking it could become almost like an IDE, with one big query text field filling the screen, and then you click run and it shows the XML result.

Unfortunately urgent matters have happened and I have not gotten further than setting up the compiler for an empty project directory :( (huge annoyance, I set it up with ant and Sherlock-activity, and then those became deprecated and I had to start over with gradle and ActionbarActivity)

Earlier I made a command line tool that seems to run on Android, but you need a terminal emulator app. (afair I have fixed the memory issue mentioned in the later comments)

I also made an app for public libraries to automatically renew all books that you have lend from the library. It keeps a history of lend books and you can search that history, e.g. to get a list of all books that you have lend about a certain topic. Or find the book that you have lend the most often. The twist is you search with XQuery. Normal people enter $books[title = "foo"], but you can write serialize(<foo>bar</foo>) or doc("file:///whatever")/foo to run any XQuery on any local file inside the app. However, the entire query has to fit in one line, is not saved and the app is in German. (it will ask for the username/password of your public library account, but accepts an empty username, too).

Sign up to request clarification or add additional context in comments.

2 Comments

First of all, thank you for your interest... Can you please tell me what library you used to make it work ?
No library involved. I wrote an entire XQuery interpreter from scratch, because I was too lazy to renew my lend books myself. On SourceForge you can find the interpreter within the app source, on GitHub it is in a separate repository. However, it is written in Pascal, so you cannot use it directly from Java. But you can write a wrapper in Pascal and load that with JNI. Actually, with JNI you could load any other library, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.