Thread: Changing xml in a database

Changing xml in a database

From
"C G"
Date:
Dear All,

I have installed the contrib xml package and have it working, but I would
like some advice on the best way to use it. In particular, how should I
alter xml files? For instance, if I have:

<name>None</name>

and I wanted to update 'None' to 'John', what's the best way of doing this?
Can xml contrib package do this for me, if so how? What including a new
level, e.g.

<name>None</name>
<address>somewhere</address>

Many thanks

Colin

_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you.
http://www.msn.co.uk/internetaccess


Re: Changing xml in a database

From
"John Gray"
Date:
On Tue, 11 Nov 2003 11:02:51 +0000, C G wrote:

> Dear All,
>
> I have installed the contrib xml package and have it working, but I would
> like some advice on the best way to use it. In particular, how should I
> alter xml files? For instance, if I have:
>

There's no way at present. The support in contrib/xml is really intended
for querying document stores in which each document is updated as a whole.
There are other PG/XML solutions available which decompose XML documents
into database tables which might be better for your application, eg.
Xpsql (which I confess I've never had time to look at!):

http://gborg.postgresql.org/project/xpsql/projdisplay.php

In general, contrib/xml treats xml documents as blocks of text with XPath
queries. It was really meant as a proof of concept (which happens to work
in production :-)

Regards

John