XML filter and tags with no values

Hi,
I have an XML with some tags that has no value.
Captura

When parsed, the tags wuth no value are not refected in the target

Does exists any option to force to parse the tag and leave it with emptu value?
I have tried the supress_empty set it to force but I get an error "failed to parse field [poc.mi.mv.r] of type [text]...

Thank you
regards
Ana

suppress_empty is the right option.

input { generator { count => 1 message => '<foo><r></r><r>a</r></foo>' } }
filter { xml { source => "message" target => "theXML" store_xml => true suppress_empty => false } }
output { stdout { codec => rubydebug } }

gets me

    "theXML" => {
    "r" => [
        [0] {},
        [1] "a"
    ]
}
1 Like

Many Thanks @Badger

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.