Re: Converting xml to table with optional elements

From: David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andrus <kobruleht2(at)hot(dot)ee>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting xml to table with optional elements
Date: 2014-11-28 18:03:42
Message-ID: CAKFQuwZPxuQSaXchkS4CutfnrHXKEBd7K5eH4NANwJvMn7U0cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 28, 2014 at 10:47 AM, Andrus <kobruleht2(at)hot(dot)ee> wrote:

> Hi!
>
> Thank you.
>
> Instead of defining an xpath for fields define one that captures the xml
>> pertaining to the data that would belong to
>> a single record.How to create single xpath or xsl which assigns values to
>> all columns in Postgres table ?
>>
> I havent found such sample. Samples which I have found create every column
> separately using separate xpath.
>
>
>
I don't know - I'm not a heavy user of xpath/xml. I do know that "text()"
will not be of help because you have to return an entire node - xml
elements included. The textual representation of that node is then to be
stored and all the extraction xpath expression executed against it.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Misa Simic 2014-11-28 20:18:17 Re: PG94RC1- plv8 functions - problem with input parameter length
Previous Message Andrus 2014-11-28 17:47:46 Re: Converting xml to table with optional elements