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 <[email protected]> wrote:

> 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, as shown in the
> following XML snippet:
>
> <equipment>
>   <bakeware>
>     <object min-quantity="20">ramekin</object>
>     <object min-quantity="2" alias="pan">shallow baking pan</object>
>   </bakeware>
>   <cookware>
>     <object min-quantity="1" alias="pot">medium pot</object>
>   </cookware>
>   <utensils>
>     <object alias="torch">kitchen butane torch</object>
>     <object alias="sieve">fine-mesh sieve</object>
>     <object alias="whisk">wire whisk</object>
>   </utensils>
> </equipment>
>
> In PostgreSQL 9.1, I do not see an XML function that allows XML element
> creation based on row data. It seems the row data is always used as the
> values for elements.
>
> How do you create XML elements using names stored as row data?
>
> Thank you!
>

Reply via email to