Re: Postgresql 8.4, XPath and name() function

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Postgresql 8.4, XPath and name() function
Дата
Msg-id AANLkTinpGhcOJ6_W1PbuWknQ0xcK1Ycp9apsSCRM0cfJ@mail.gmail.com
обсуждение исходный текст
Ответ на Postgresql 8.4, XPath and name() function  (ced45 <cedric.duprez@ifn.fr>)
Ответы Re: Postgresql 8.4, XPath and name() function  (ced45 <cedric.duprez@ifn.fr>)
Список pgsql-general
On 13 July 2010 09:03, ced45 <cedric.duprez@ifn.fr> wrote:
>
> Hi List,
>
> I have trouble using XPath name() function in a XML field.
> For example, when I execute the following query :
>
> SELECT XPATH('name(/*)', XMLPARSE(DOCUMENT '<unit>value</unit>'))
>
> I would like to get "unit", but I just get an empty array ({}).
> How can I get "unit" ?
>
eneral@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Have you tried:

SELECT XPATH('fn:name(/*)', XMLPARSE(DOCUMENT '<unit>value</unit>'));

Thom

В списке pgsql-general по дате отправления:

Предыдущее
От: Andras Fabian
Дата:
Сообщение: Re: PG_DUMP very slow because of STDOUT ??
Следующее
От: ced45
Дата:
Сообщение: Re: Postgresql 8.4, XPath and name() function