clean xml tags of invalid characters. Fixes #3305
needed xpath dependency for iOS