Re: select xpath ... - Mailing list pgsql-sql

From boris
Subject Re: select xpath ...
Date
Msg-id j57o6v$67k$2@speranza.aioe.org
Whole thread Raw
In response to select xpath ...  (boris <boris@localhost.localdomain>)
Responses Re: select xpath ...
List pgsql-sql
On 09/19/2011 10:49 AM, Rob Sargent wrote:
> Having a name space in the doc requires it's usage in the query.

yeah, I got it... I was using wrong one...
thanks.


>
>
> On 09/17/2011 11:48 AM, boris wrote:
>> hi all,
>> I've inserted xml file :
>>
>> <?xml version="1.0"?>
>> <document xmlns:s1="urn:myorg/s1" xmlns="urn:myorg"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>      <id num="111-222-333-4444"/>
>>      <title>zzzzzz</title>
>> ......................
>>
>>
>> to a table:
>>
>> CREATE TABLE "temp".tempxml
>> (
>>    record xml
>> )
>>
>> I can get it using:
>> select * from temp.tempxml
>>
>>
>> but, I can't get any values using xpath. ex:
>>
>>
>>    select (xpath('/document/title/text()', record ))[1] from temp.tempxml
>>
>>
>> am I doing it right?
>>
>> thanks.
>>
>>
>>
>>
>



pgsql-sql by date:

Previous
From: Dianna Harter
Date:
Subject: Re: Window function sort order help
Next
From: Thomas Kellerer
Date:
Subject: Combining several CTEs with a recursive CTE