Re: Transform mapped XPath expressions into XML containing relational data - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Transform mapped XPath expressions into XML containing relational data
Date
Msg-id 1353990826.4992.14.camel@vanquo.pezone.net
Whole thread Raw
In response to Transform mapped XPath expressions into XML containing relational data  (Thangalin <thangalin@gmail.com>)
List pgsql-hackers
On Mon, 2012-11-26 at 09:26 -0800, Thangalin wrote:
> Is it possible to build an XML (or JSON) document using a map database
> columns to XPath expressions? For example:
> 
> root               > people
> person             > person
> person.first_name -> name/first
> person.last_name  -> name/last
> person.age        -> [@age]
> account.person_id => person.person_id
> account            > person/account
> account.number    -> [@id] 

I would go about this by using table_to_xml or query_to_xml and then
converting the resulting XML document to your particular format using
XSLT.





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [WIP] pg_ping utility
Next
From: Michael Paquier
Date:
Subject: Re: Re: Problem Observed in behavior of Create Index Concurrently and Hot Update