You can use the PHP XQuery extension to do the job:
let $data :=
setting1 value
setting2 value
setting3 value
return {
(: Update :)
replace value of node $data/setting1/text() with "Hello World";
(: Delete :)
delete node $data/setting2;
(: Read :)
$data
}
You can try the example above live at http://www.zorba-xquery.com/html/demo#BJ2a2bNxJc8JVZAl0qyjAelwN9s=
Instructions on how to install the XQuery PHP extension are available at http://www.zorba-xquery.com/html/entry/2011/12/27/PHP_Meets_XQuery