The above did not work for me. I had to "slightly" modify that as follows:
/data/stats/*[contains(name(),'_cost')]
The above did not work for me. I had to "slightly" modify that as follows:
/data/stats/*[contains(name(),'_cost')]