How extract data with logstash filter xml from a complex xml

Hello, I need to extract the data returned from an xml in an http input

The xml Returned is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model-response-list xmlns="" total-models="1" throttle="1" error="EndOfResults">
        <model xx="0x12345">
            <attribute id="0x1212e">FIELD I WANT</attribute>
            <attribute id="0x1219f">FIELD I WANT</attribute>
            <attribute id="0x23454">FIELD I WANT</attribute>
            <attribute-list id="0x12zaq">
                <instance oid="2" value="11"/>
            <attribute-list id="0x12ac6">
                <instance oid="1" value="65"/>
                <instance oid="14" value="100"/>

In addition to these fields, I need the values ​​of these

oid="2" value="11"
oid="14" value="100"

My logstash conf is:

        urls => {
                urlname => ""
        request_timeout => 60
        schedule => {every => "3s"}
        codec => line

filter {
        xml {
           store_xml => false
           source => "message"
           remove_namespaces => true
           xpath =>[ "/model-response-list/model-responses/model/attribute", "FIELDRETRIEVEONE"]

        hosts => [""]
        index => "logstash_http_poller"
stdout { codec => rubydebug }

I can get the first value, but the next I couldn't. Can anybody help me?
Thank you very much!

Please do not post pictures of text, just post the text.

I solved my problem forcing the response be a json file

headers => {
			Accept => "application/json"

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