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