xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julie McCabe <julie.mcc...@qub.ac.uk>
Subject Re: Updating specific documents in a Collection
Date Mon, 13 Oct 2003 10:12:53 GMT
Hi,

I think the following should work,

use the xupdate XML as,

<xupdate:modifications version="1.0" 
xmlns:xupdate="http://www.xmldb.org/xupdate">
	<xupdate:update select="/user/name[.='Joe']/../city">Detriot</xupdate:update>
</xupdate:modifications>

then if your using Java -  call s'thing like,

XUpdateQueryService updateService = ....
updateService.update(updateXml);


Regards,
Julie.

On Monday 13 October 2003 10:51, Matthieu RIOU wrote:
> Hi,
>
> I want to update a document in a collection but the element used to select
> the document in the collection and the element I want to replace are
> different. For example in :
>
> <user>
>       <name>Joe</name>
>       <address>
>             <street>Michigan Avenue</street>
>             <city>Chicago</city>
>       </adresse>
> </user>
>
> How can I express that I want to change the city to Detroit in the document
> having Joe as name ?? My understanding is that xupdate is made to update a
> document so how do you do when you want to update only some documents in a
> collection ??
>
> Thanks a lot. Matt.
>
>
>
>
>
> ---------------------------------
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran├žais !
> Testez le nouveau Yahoo! Mail


Mime
View raw message