How to Mask Card Number

Please don't post the same question more than once - How to mask card number of xml message