Hi Satheesh,

Thanks for your comments.  I've included some responses
inline below.

Susan

--- Satheesh Bandaram <[EMAIL PROTECTED]> wrote:
[ snip ]
> 
> There is no way to extract parts of XML documents out into SQL world, which
> could allow you to do order by.
> 
> However, you may be able to write your own Java function that takes
> serialized XML as function argument along with XPath expression and return
> your item of interest. You could then order by on this expression, thanks to
> Tomohito's extension to ORDER BY.

Okay, I may or may not look into this, but thanks for the suggestion.

> 
> If you are doing all this, then why even store XML documents in XML type and
> not just use CLOB or VARCHAR?

In the application I am using I want the database to return XML.  But given
the inability of Derby to perform this type of query at the present time
I may just do the parsing of the XML document on the client.

[snip]

> Thanks for trying Derby XML... and for being brave to figure out
> dependencies! Hopefully 10.2 XML support would be more complete and show up
> in documentation.

You bet!
 
> On 3/31/06, Susan Cline <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I've looked at some of the tests for the XML support but I am still
> > confused if this is possible or not.  Given a table created with
> > an xml column:
> >
> > create table xmlTab (id integer, xml_col xml);
> >
> > Containing these two xml documents:
> >
> > <Contact>
> > <id>1</id>
> > <firstname>Susan</firstname>
> > <lastname>Cline</lastname>
> > </Contact>
> >
> > <Contact>
> > <id>2</id>
> > <firstname>Apache</firstname>
> > <lastname>User</lastname>
> > </Contact>
> >
> > I'd like to come up with a query that returns results ordered by
> > firstname (or any other element in the XML document.)
> >

[snip]

Reply via email to