to get
<p>This is only an illustrative example, not a real text.</p> from <p>This is only an illustrative <hi>example</hi>, not a <q>real</q> text.</p>
Is there any way, to do it with the help of BaseX XQuery Update?
There are hundred ways ;) One looks as follows:
db:create( 'index', for $item in db:open('data') return $item update ( delete node .//(note|sic), for $p in .//p return replace value of node $p with string(p) ), db:open('data')/db:path(.) )