pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rishabh Gupta <rg117@york.ac.uk>
To: pgsql-general@postgresql.org.pgsql-sql
Subject: postgresql query to XML result
Date: Sat, 20 Apr 2002 22:01:13 +0100
Message-ID: <a9sktm$6ol$1@pump1.york.ac.uk> (raw)

Hi all,
    Can anyone tell me whether there is any querying system that allows
query results to be output in XML. The data that I am dealing with  is
ordinary relation data, so this is not a question on how to store XML
documents into postgresql. I am not trying to save XML documents into the
DB. What I would like is if I could run an SQL-like query and the output
would be an XML document.

E.g. suppose I have a database of Music CDS, there would be a table for the
CD, a table for the Artist, a table for the Track. There would be further
tables to join them together, e.g. CD_Artist and CD_Track. The output of a
query would be something like this:

<CD>
    <TITLE>CD TITLE</TITLE>
    <ARTISTS>
        <ARTIST>artist1</ARTIST>
        <ARTIST>artist2</ARTIST>
        <ARTIST>artist3</ARTIST>
        <ARTIST>artist4</ARTIST>
    </ARTISTS>
    <TRACKS>
        <TRACK>Track Title 1</TRACK>
        <TRACK>Track Title 2</TRACK>
        <TRACK>Track Title 3</TRACK>
        <TRACK>Track Title 4</TRACK>
        <TRACK>Track Title 5</TRACK>
    </TRACKS>
</CD>


I have had a look at LXP but I would prefer something that sits closer to
the actual DBMS. As I understand it, LXP is a scripting language that is
executed by Apache.

Does anyone know of such a system. Your help would be greatly appreciated.

Many Thanks

Rishabh





Message-ID: <a9sktm$6ol$1@pump1.york.ac.uk>
Permalink:  ../a9sktm$6ol$1@pump1.york.ac.uk/
Also on:    postgresql.org/message-id/a9sktm$6ol$1@pump1.york.ac.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rg117@york.ac.uk, pgsql-general@postgresql.org.pgsql-sql
  Subject: Re: postgresql query to XML result
  In-Reply-To: <a9sktm$6ol$1@pump1.york.ac.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox