Need to display the decoded string in xml

Hi All,

I need to decode an sting using base64 , so I decoded using the following steps

ActiveSupport::Base64.decode64(“534b38baeee35c35”)

=> “�~ ���y���\315\371”

While displaying it in browser as XML , I am facing the XML parsing error, my output is below

XML Parsing Error: not well-formed

Location: http://localhost:3000/api/applications

Line Number 2, Column 1032:

01478testapp32.0wac-w444ert9-tyts-fr4w-c34r-a95r9b8eb059title-textThis is test description webtestuserACTIVEproduct_item1wac-1fbf3e6-e840-4daa-824e-62d8ed83723e

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

I hope this is due to char encoding, can any one help ASAP, and I have another doubt

What is the difference between “base64 and base64binary”

regards,
Loganathan