From: | Brian Sherwood <bdsher(at)gmail(dot)com> |
---|---|
To: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: help with xpath namespace |
Date: | 2011-09-26 13:56:06 |
Message-ID: | CAExyqyhHwdNoeuexzOya2Ku=pwwoBPDHZZ-qUf7DN9WC85rMGQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Yep, that did it.
Thanks!
2011/9/23 Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>:
>
>
> 2011/9/22 Brian Sherwood <bdsher(at)gmail(dot)com>
>>
>> select (xpath('/chassis-inventory/chassis/serial-number/text()',
>> data_xml,
>> ARRAY[ARRAY['junos',
>> 'http://xml.juniper.net/junos/9.6R4/junos-chassis']]
>> )) from xml_test;
>>
>> Can anyone suggest how I would go about getting the serial-number with
>> xpath?
>>
>
>
> http://www.postgresql.org/docs/9.1/static/functions-xml.html#FUNCTIONS-XML-PROCESSING
> - see "mydefns".
>
> This will work:
>
> select xpath(
> '/junos:chassis-inventory/junos:chassis/junos:serial-number/text()',
> data_xml,
> ARRAY[ARRAY['junos',
> 'http://xml.juniper.net/junos/9.6R4/junos-chassis']]
> )
> from xml_test;
>
>
>
> cheers, Filip
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Filip Rembiałkowski | 2011-09-27 00:57:24 | Re: handling duplicate row exception |
Previous Message | David Johnston | 2011-09-25 18:44:52 | Re: Sorting of data from two tables |