XPath to search for elements in a sequence - Mailing list pgsql-general

From Brad Balmer
Subject XPath to search for elements in a sequence
Date
Msg-id 24983175.113511231879550147.JavaMail.root@pmsvl02
Whole thread Raw
List pgsql-general
With XML similar to:

<a>
 
<b>
 
<c>1</c>
 
<c>2</c>
 
<c>3</c>
</b>

I'm trying to create an xpath expression (for a postgresql query) that will return if is a particular value and not that is all three values.

What I currently have (which does not work) is:

select * from someTable where xpath ('//uim:a/text()', job, ARRAY[ ARRAY['uim','http://www.cmpy.com/uim'] ])::text[] IN (ARRAY['1','3']);


If I try with ARRAY['1'] this will not return any values but with ARRAY['1','2','3'] it will return all three.


How can I select based on a single element in a sequence?


Thanks.

pgsql-general by date:

Previous
From: Jason Long
Date:
Subject: Re: Use PSQLFS for photo storage
Next
From: Steve Atkins
Date:
Subject: Re: Use PSQLFS for photo storage