[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] Newbie - Calling XQuery from Java - "RunXQuery.java"
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] Newbie - Calling XQuery from Java - "RunXQuery.java" |
Date: |
Fri, 17 Jan 2003 23:48:58 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202 |
Phil Shaw wrote:
When I try the other versions of "RunXQuery" that
use XMLPrinter, I get compile errors.
You may need to upgrade to the latest CVS version of Kawa.
But, I don't really want to print, anyway. My aim
is to take the answer from "xq.eval(...)" and
get the answer strings in Java, not print them.
I looked at the source for "XMLPrinter", and I see
the various sorts of objects that "xq.eval(...)"
can return.
Well, eval can return any kind of Java Object. If you
restrict yourself to a limited class of expression, then
you'd get a limited set of "sorts of objects".
Am I on the right track? I.e. coding some routine
to dismantle the object I get from "x.eval(...)"
to get the answer out of it?
But it depends on the object - "dismantling" it may be
difficult. Using a Consumer is one general approach.
AbstractSequence supports the ideas of a "pull
parser", but the API needs to be documented (and
possibly simplified).
[Btw - I have to manually approve postings from
non-subscribers, so I'd appreciate it you subscribe!]
--
--Per Bothner
address@hidden http://www.bothner.com/per/