I have a XML file with multiple level structure (it is a directory structure with files, thus there are <directory name="..."> and <file name="..."> elements)
and I want to select empty directories with XPath, but I don't know, how to select nodes, which doesn't have some descendants. I can match the ns:directory[not(ns:file)] but it is only the first level of emtpy directories and I dont want to do anything like ns:directory[not(ns:file)]|ns:directory[ns:directory[not(ns:file)]]|...
Could someone please hint, how to do this?
descendant::axis that will help you here.