This answer is for XPath 1.0 where there is no equivalent of the XPath 2.0 standard ends-with() function.
The following XPath 1.0 expression selects all elements in the xml document, whose names end with the string "fu":
//*[substring(name(),string-length(name())-1) = 'fu']