Hi Sreelekha, To delete a document you use xdmp:document-delete. You can wrap that statement within the query in an if that requests and tests the contents of the document first. You can submit the query using AdhocQuery. To pass in a particular name from outside (in this case XCC), declare an external variable at the top of the query and attach the value to the AdhocQuery..
You can use xdmp:document-insert for both insert and update.. Kind regards, Geert > drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 mailto:[email protected] http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > sree lekha > Sent: woensdag 1 september 2010 23:56 > To: [email protected] > Subject: [MarkLogic Dev General] Reg: delete in marklogic > > Hi , > I need Xquery to delete an XML document based on element > value in marklogic using xcc. > > Also like to know if there is update of a document based on > element value or will it be inser only which will do update > automaically . > > > > Thanks > Sreelekha. > > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
