qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Newbie - Calling XQuery from Java - "RunXQuery.java"


From: Phil Shaw
Subject: Re: [Qexo-general] Newbie - Calling XQuery from Java - "RunXQuery.java"
Date: Fri, 17 Jan 2003 15:05:52 -0800 (PST)

Thanks for the quick response.  Sorry for these
basic questions about "RunXQuery".

I've read the material in "Calling XQuery Expressions
from Java".  The basic "RunXQuery" works fine
for queries with simple scalar answers.

When I try the other versions of "RunXQuery" that
use XMLPrinter, I get compile errors.

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.   

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?

Thanks,

Phil Shaw - address@hidden

--- Per Bothner <address@hidden> wrote:
> Phil Shaw wrote:
> > 
> > Hi,
> > 
> > When I run the "RunXQuery" example class,
> > it all seems to work fine, except that the
> > value returned in "result" by the following
> > Doesn't seem to be a String:
> > 
> >     Object result = xq.eval(exp)
> > 
> > The "toString()" (implicit or explicit) value from
> > that is "address@hidden", regardless
> > what sort of simple query I run.
> 
> The class gnu.mapping.Values is uses to implement
> XQuery sequences that are not a single value.  The
> result would not be a String.
> 
> I recently added (in CVS) a toString implementation
> for Values, but it is better to avoid using it.
> 
> See http://www.gnu.org/software/qexo/Running.html ,
> especially the "Calling XQuery Expressions from
> Java"
> section.
> -- 
>       --Per Bothner
> address@hidden   http://www.bothner.com/per/
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]