Base64 decode issue

That will decode the base64 and result in

"decoded" => "<?xml\xC2\xA0version=\"1.0\"\xC2\xA0encoding=\"ISO-8859-1\"?>\xC2\xA0\xC2\xA0<note>

The \xC2\xA0 are non-breaking spaces in UTF-8, but the decoded string is ASCII-8BIT (puts Base64.decode64(event.get("payload")).encoding.name will tell you that).

So the default encoding is wrong. You can change it using

ruby { code => 'event.set("decoded", Base64.decode64(event.get("payload")).force_encoding("UTF-8"))' }

which will result in

"decoded" => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>  <note>   <to>Tove</to>...

Note that an xml filter will not parse non-breaking spaces, so you need to replace them if you want to parse the XML

mutate { gsub => [ "decoded", "[[:space:]]", " " ] }