Re: [SQL] help with xpath namespace

2011-11-08 Thread Ross Reedstrom
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

Re: [SQL] help with xpath namespace

2011-09-26 Thread Brian Sherwood
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; >

Re: [SQL] help with xpath namespace

2011-09-23 Thread 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; > > Can anyone suggest how I would go about getting the serial-number wit

[SQL] help with xpath namespace

2011-09-23 Thread Brian Sherwood
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