Re: [SQL] get attribute from XML

2010-10-12 Thread Viktor Bojović
Dear Markus, it works now. Thanx. On Tue, Oct 12, 2010 at 2:22 AM, Markus Schatten wrote: > Dear Viktor, > > 'modified' is an attribute node, so you need to use the @ sign to > acquire its value: > > mschatte=# select xpath( '//entry/@modified', ' modified="2009-07-07" dataset="S" created="2009-0

Re: [SQL] get attribute from XML

2010-10-11 Thread Markus Schatten
Dear Viktor, 'modified' is an attribute node, so you need to use the @ sign to acquire its value: mschatte=# select xpath( '//entry/@modified', '' ); xpath -- {2009-07-07} (1 row) HTH M.S. On Tue, Oct 12, 2010 at 1:03 AM, Viktor Bojović wrote: > Hi, > while parsing this type

[SQL] get attribute from XML

2010-10-11 Thread Viktor Bojović
Hi, while parsing this type of XML: Q91G55 i tried this query to get the modified attribute select xpath('//entry/modified/text()',xml) from xml_sprot limit 10; but it doesn't work. So im asking if anyone can help me with that. Thanx in advance -- --- Viktor