Re: Need xml element constructor given tag, attribute array & children

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "J(dot) Greg Davidson" <jgd(at)well(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need xml element constructor given tag, attribute array & children
Date: 2010-06-29 02:41:09
Message-ID: 4C295D45.2090205@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29/06/10 09:49, J. Greg Davidson wrote:
> Hi Everybody,
>
> I'm having trouble finding any way to build up
> XML values from their logical components, e.g.
> given an XML element tag, an array of attributes
> in some form, and an xml[] array of children I
> can't find any SQL function or expression which
> would construct the XML element. Surely the
> syntactic sugary XMLPARSE must be calling such
> a function? Am I missing something or is
> PostgreSQL missing something?

The XMLELEMENT pseudo-function will do what you need.

http://www.postgresql.org/docs/current/static/functions-xml.html

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2010-06-29 06:20:11 owner of a database does not own "public" schema?
Previous Message J. Greg Davidson 2010-06-29 01:49:34 Need xml element constructor given tag, attribute array & children