On 13 July 2010 09:03, ced45 <cedric(dot)duprez(at)ifn(dot)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(at)postgresql(dot)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