Re: xpath_list() question for contrib/xml2

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: John Gray <jgray(at)azuli(dot)co(dot)uk>
Cc: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: xpath_list() question for contrib/xml2
Date: 2005-02-15 02:36:35
Message-ID: 200502150236.j1F2aZR16735@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Added to TODO:

* Add xpath_array() to /contrib/xml2 to return results as an array

---------------------------------------------------------------------------

John Gray wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-02-15 03:30:35 Re: Bug in COPY from CSV?
Previous Message Jeff Davis 2005-02-15 02:15:56 random record from small set