Re: Converting xml to table with optional elements - Mailing list pgsql-general

From David Johnston
Subject Re: Converting xml to table with optional elements
Date
Msg-id CAKFQuwZPxuQSaXchkS4CutfnrHXKEBd7K5eH4NANwJvMn7U0cQ@mail.gmail.com
Whole thread Raw
In response to Re: Converting xml to table with optional elements  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general

On Fri, Nov 28, 2014 at 10:47 AM, Andrus <kobruleht2@hot.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.
 

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: Converting xml to table with optional elements
Next
From: Misa Simic
Date:
Subject: Re: PG94RC1- plv8 functions - problem with input parameter length