On Mon, Sep 26, 2011 at 09:56:06AM -0400, Brian Sherwood wrote:
> Yep, that did it.
>
> Thanks!
ProTip (for the list archive): since the namespace alias in the query and the
original XML don't need to match (in this common case, the document uses a
default namespace, which isn't available in xpat
Yep, that did it.
Thanks!
2011/9/23 Filip Rembiałkowski :
>
>
> 2011/9/22 Brian Sherwood
>>
>> 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;
>
2011/9/22 Brian Sherwood
>
> 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 wit
I am trying to use xpath to extract some information from a XML document.
(if it matters, It's the router config for a Juniper router)
I believe I am having problems with the namespace.
I am trying to extract the serial-number, but I am not getting anything.
Here is the script I have been testing