using re-encoding function in Tyxml