pgxml_xpath - solution. - Mailing list pgsql-general

From Jeff MacDonald
Subject pgxml_xpath - solution.
Date
Msg-id HJEPJELDKPJEEIIFNLNHEEEACAAA.jeff@interchange.ca
Whole thread Raw
List 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.


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: slow update & index question
Next
From: Bruce Momjian
Date:
Subject: Re: client side software for windows, where?