pgxml_xpath - solution.

From: "Jeff MacDonald" <jeff(at)interchange(dot)ca>
To: "Postgres List" <pgsql-general(at)postgresql(dot)org>
Subject: pgxml_xpath - solution.
Date: 2002-10-21 19:04:26
Message-ID: HJEPJELDKPJEEIIFNLNHEEEACAAA.jeff@interchange.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

john gray sent me this solution.

>>I had to work this out for someone a month or so back, and there is an
>>easy answer.

>>Use 'string(//@dft_entityid)' for the XPath and it will do this for you.
>>If you do this a lot, you might want to write a wrapper funtion to modify
>>your XPath string this way.

which means the following query works..

cfm=> SELECT loginid,pgxml_xpath(userdata,'string(//@dft_entityid)','','')
FROM urdr_users where id = 110;
loginid | pgxml_xpath
---------+-------------
110 | 74
(1 row)

Jeff.

Browse pgsql-general by date

  From Date Subject
Next Message Ilana Brody 2002-10-21 19:05:32
Previous Message Stephan Szabo 2002-10-21 18:58:41 Re: slow update & index question