Hi, I want to run an xquery that deletes elements that are empty, e.g., 
<tag></tag>
The following code works for a specific element:
declare namespace xh="http://marklogic/";for $t in (/xh:BOOKS)/xh:TITLESreturn 
if ($t='')then  xdmp:node-delete($t)else  ()
However, how can I modify it to delete all elements in BOOKS, not just TITLES? 
I tried obvious solutions like for $t in (/xh:BOOKS) and this did not hit any 
of the elements.
Thanks,
Mark                                      
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to