base64 encode capsuled text to fit in xml