It seems to me that org.xmldb.api.getParentCollection() returns the rootcollection. Is this a feature or a bug?
 
Standing at collection C in /db/A/B/C the method returns /db. Who do I get /db/A/B
 
I need it for upwards recursively removing of empty collections.
 
best regards
 
Henrik Ryom