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 -> [(at)age]
> account.person_id => person.person_id
> account > person/account
> account.number -> [(at)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.