//*[string-length(name()) = 5]
Select all elements with length-name (=, >, <) ...//*[string-length(name()) = 5]
... <aaa> <bbb> <ccc> <ddd id="1"></ddd> <eee id="2"></eee> <ddd id="3"></ddd> <fffff>this</fffff> </ccc> </bbb> </aaa> ...