Arun Batchu Blog from Jan 14, 2009

  2009/01/14
Scrubbing data using eXist
Last Changed by Arun Batchu, Jan 14, 2009 11:16
Labels: exist, xquery, tip

I had to scrub some private data in a few thousands of xml documents stored in an eXist database.

I used this:
update value expr with exprSingle

So, for e.g.

let $ssn-ids := $collection//u:PersonSSNID[. != '888888888']
update value $ssn-ids with '888888888'

The filter expression makes the xquery repeatable and precise.

Look up the update extensions here: http://exist-db.org/update_ext.html#N101B9 for more details and other update mechanisms. Quite useful.

Posted at 14 Jan @ 11:09 AM by Arun Batchu | 0 Comments