Re: [GENERAL] Create XML elements from rows

2011-12-28 Thread Thangalin
Here is a partial solution to the problem I encountered (the full solution uses a UNION ALL and the same statement four times): SELECT xmlelement( name "bakeware", xmlconcat( array_to_string( array_agg( xmlelement( name "object", xmlattributes( e.abridge AS "alias" ),

Re: [GENERAL] Create XML elements from rows

2011-12-28 Thread Raghavendra
Check below link:- http://wiki.postgresql.org/wiki/XML_Support --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Wed, Dec 28, 2011 at 1:41 PM, Thangalin wrote: > Hi, > > Data in a table called 'equipment_group' (eg) contains various equipment > categor

[GENERAL] Create XML elements from rows

2011-12-28 Thread Thangalin
Hi, Data in a table called 'equipment_group' (eg) contains various equipment categories: bakeware cookware kitchenware utensils I would like to use these values as elements within an XML document. Something like: xmlelement( name eg.label ) Each of these data element can have multiple objects