Logstash xml filter ruby cleanup code help

Take a look at this which recursively descends into hashes and arrays in the parsed XML and deletes items that match a condition (in that case based on the length of the element name, but you can change that to be based on the value).