| From: | Rita <rmorgan466(at)gmail(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | xpath query |
| Date: | 2017-01-25 02:02:30 |
| Message-ID: | CAOF-KfjdGQU2bBm_LFKw4Y_JJfqDZ3eotqQ2pDNHo3NJKGZqAA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Using postgresql latest for a project.
I have a XML document which I would like to store in a table and query it
using xpath function.
My document looks like this:
<ca>
<c>
<a n="color"><s>red</s></a>
<a n="year"><i>1995</i></a>
</c>
</ca>
How can I extract color. expected value is "red"
Also, is it better to dump the data into a table and then use some sort of
trigger to parse it into a more normalized format for querying or is it
better to to leave it as a XML dump and have the application handle the XML
parsing?
--
--- Get your facts first, then you can distort them as you please.--
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Wei Shan | 2017-01-25 08:39:08 | Re: Postgres authentication to multiple application servers |
| Previous Message | padmini | 2017-01-24 23:35:24 | Postgres authentication to multiple application servers |