open file.xml ; for ( /descendant-or-self::node() | //@* ) echo xsh:path(.) (.) ; #### [not(./*)][not(self::text())]