xml build a list of all elements - Mailing list pgsql-sql

From ft
Subject xml build a list of all elements
Date
Msg-id 2c00e954c31459c43f0d78119c1bd0547f7eddb2.camel@ft-c.de
Whole thread Raw
Responses Re: xml build a list of all elements
List pgsql-sql
Hello, 

I have a postgresql database table with xml data. 
What I need is a list of all elements and attributes.
Example:
<area>
  <sub>
   <sub2 attr='1'>comment</sub2>
   <sub2 attr='2'>comment</sub2>
  <sub>
</area>

The result should be:
/area
/area/sub
/area/sub/sub2
/area/sub/sub2@attr
/area/sub/sub2
/area/sub/sub2@attr

or distinct (it's enough)
/area
/area/sub
/area/sub/sub2
/area/sub/sub2@attr

Is there a postgresql function to build this list?

Franz



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Get error when calling function that returns a table
Next
From: Steve Midgley
Date:
Subject: Re: xml build a list of all elements