I have a situation where I need to extract base64 encoded text that is actually a new XML document. This I can easily do by using dp:parse() function. The problem comes when the base64 encoded XML document contains special national characters such as ä or ö. Does anyone know how could I avoid this?
Here is the input document:
<?xml version="1.0" encoding="UTF-8"?> <foo> <base64encodedDocument>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxiYXI+PGNvbnRlbnQ+SGVyZSB5b3UgaGF2ZSBzb21lIHNwZWNpYWwgY2hhcmNhdGVyczogw7bDpMOlPC9jb250ZW50PjwvYmFyPg==</base64encodedDocument> </foo>
And here is what I would like to get out from <base64encodedDocument> after decoding:
<?xml version="1.0" encoding="UTF-8"?> <bar><content>Here you have some special charcaters: öäå</content></bar>
Anyone have any ideas how to do this?