Connecting Tech Pros Worldwide Forums | Help | Site Map

driver for SQL query on XML File?

blabla120@gmx.net
Guest
 
Posts: n/a
#1: Apr 11 '06
HI folks,

I am searching for a tool to send sql-queries to a XML file. Example:

<cars>
<car>
<brand>BMW</brand>
<color>red</color>
</car>
<car>
<brand>Mercedes</brand>
<color>Blue</color>
</car>
<car>
<brand>Audi</brand>
<color>red</color>
</car>

I want to send a query like

SELECT brand from cars where color = 'red'

to the XML File. The result would be

BRAND
-----------
BMW
Audi

Is there some kind of funky XML driver tool which grants me access to
an XML file like it was a relational database?

Thanks for any hints or suggestions,

Bernd


Joseph Kesselman
Guest
 
Posts: n/a
#2: Apr 11 '06

re: driver for SQL query on XML File?


IBM's latest version of DB2 is adding support for a "native" XML
representation, which can be searched using either SQL or XQuery. That
might be what you're looking for. I think a downloadable beta is available.
Jürgen Kahrs
Guest
 
Posts: n/a
#3: Apr 11 '06

re: driver for SQL query on XML File?


blabla120@gmx.net wrote:
[color=blue]
> Is there some kind of funky XML driver tool which grants me access to
> an XML file like it was a relational database?[/color]

Andrew Schorr has written a similar tools.
He first loads the XML file into his database
(which is PostgreSQL) and then the usual SQL
queries will do the work. His tool is described
here:

Loading XML data into PostgreSQL
http://home.vrweb.de/~juergen.kahrs/...nto-PostgreSQL
Closed Thread