Delete xml node from xml-document

From: "Oleg Malyovaniy" <deer_oleg(at)mail(dot)ru>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Delete xml node from xml-document
Date: 2008-04-29 10:30:04
Message-ID: E1Jqn4x-0004Mx-00.deer_oleg-mail-ru@mx34.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I try to delete some node from xml using plpgsql language

How can I do it?

To sample

SELECT INTO xlst_templ '//myNode';

SELECT INTO v_xml XMLPARSE(DOCUMENT value) from myTable WHERE id=ids;

RAISE NOTICE '%', v_xml; -- variable v_xml contain my xml document.

SELECT INTO v_nodes xpath(xlst_templ, v_xml); -- variable v_nodes contain
array of xml elements "myNode"

what next?

How delete all nodes "myNode'" from document v_xml?

Thanks for your help.

Oleg A Malyovany

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2008-04-29 11:42:13 Re: String Comparison and NULL
Previous Message William Temperley 2008-04-29 08:59:04 Re: passing a temporary table with more than one column to a stored procedure