Re: Need xml element constructor given tag, attribute array & children - Mailing list pgsql-general

From Craig Ringer
Subject Re: Need xml element constructor given tag, attribute array & children
Date
Msg-id 4C295D45.2090205@postnewspapers.com.au
Whole thread Raw
In response to Need xml element constructor given tag, attribute array & children  ("J. Greg Davidson" <jgd@well.com>)
List 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/

pgsql-general by date:

Previous
From: "J. Greg Davidson"
Date:
Subject: Need xml element constructor given tag, attribute array & children
Next
From: Vibhor Kumar
Date:
Subject: Re: Prepared statement issue in Pgpool-II