Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpDzM-005g95-3P for pgsql-sql@arkaria.postgresql.org; Tue, 26 Mar 2024 21:05:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rpDzL-005k1Y-0J for pgsql-sql@arkaria.postgresql.org; Tue, 26 Mar 2024 21:05:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpDzK-005k1D-NT for pgsql-sql@lists.postgresql.org; Tue, 26 Mar 2024 21:05:42 +0000 Received: from einhorn.in-berlin.de ([192.109.42.8] helo=einhorn-mail-out.in-berlin.de) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpDzG-006akt-2T for pgsql-sql@lists.postgresql.org; Tue, 26 Mar 2024 21:05:41 +0000 X-Envelope-From: ml@ft-c.de X-Envelope-To: Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 42QL5Zjv799559 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Tue, 26 Mar 2024 22:05:35 +0100 Message-ID: <2c00e954c31459c43f0d78119c1bd0547f7eddb2.camel@ft-c.de> Subject: xml build a list of all elements From: ft Reply-To: ml@ft-c.de To: pgsql-sql@lists.postgresql.org Date: Tue, 26 Mar 2024 22:04:55 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 FreeBSD GNOME Team MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello,=C2=A0 I have a postgresql database table with xml data.=C2=A0 What I need is a list of all elements and attributes. Example: comment comment 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