Re: xpath_list() question for contrib/xml2 - Mailing list pgsql-general

From John Gray
Subject Re: xpath_list() question for contrib/xml2
Date
Msg-id pan.2005.01.25.23.48.43.42406@azuli.co.uk
Whole thread Raw
In response to xpath_list() question for contrib/xml2  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Responses Re: xpath_list() question for contrib/xml2
List pgsql-general
On Mon, 24 Jan 2005 16:53:47 -0800, Ron Mayer wrote:

> Short summary:
>
>    I want something like xpath_list() that returns an array
>    (instead of a delimited, concatenated string) when multiple
>    nodes exist in an XML file.  It feels to me like that'd
>    be a better (cleaner) API.
>

Yes. It's been at the back of my head that it would be a nice idea - when
I first started on contrib/xml and /xml2 array support was rather
primitive.

>    Before I write one, does anyone already have such a
>    patch?  If not, would people be interested if I added
>    xpath_array() that behaves like xpath_list() but returns
>    an array instead of one big string?
>
>    Or... is xpsql on gborg or some other postgresql-xml project a better
>    place for me to be looking?
>

Well, if you like the way that contrib/xml2 works, I would add it there,
but I'm obviously biased. It could just be another wrapper around
pgxml_xpath but use its own traversal of the nodeset instead of
pgxmlnodesettotext. I can't speak for whether anyone else is doing
anything similar, but I haven't heard anyone say so!

Thanks for your interest

John


pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: EMBEDDED PostgreSQL
Next
From: "TJ O'Donnell"
Date:
Subject: Re: visualizing B-tree index coverage