# Need to parse the xml data via logstash

**URL:** https://discuss.elastic.co/t/need-to-parse-the-xml-data-via-logstash/147247
**Category:** Logstash
**Created:** [September 4, 2018, 5:12pm UTC](https://discuss.elastic.co/t/need-to-parse-the-xml-data-via-logstash/147247 "2018-09-04T17:12:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Bharath\_Pusuluri](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@Bharath\_Pusuluri](https://discuss.elastic.co/u/Bharath_Pusuluri)
#### Post date: [September 4, 2018, 5:12pm UTC](https://discuss.elastic.co/t/need-to-parse-the-xml-data-via-logstash/147247/1 "2018-09-04T17:12:34Z")

</div>

I am trying to parse an XML using 5.2.1 logstatsh version.  
Sample xml

am getting error below:  
WARN logstash.filter.split - Only String and Array Types are splittable.field:apps[app] is of type = NilClass

ERROR logstash.codecs.json -JSON parse error, original data now in a message field {:error=\>#\<Logstash::Json::ParserError: Unrecognized token 'This' : was expecting ('true' .'false', or 'null') at [Source : This is standby RM. The redirect url is: /ws/v1/custer/scheduler  
input{  
exec {  
type=\>"apps"  
command =\>" curl -s "  
interval =\>"5"  
codec=\>"plain"  
}  
}  
filter{  
if[type] =="apps"  
{  
split{  
field=\>"apps[app]"  
}  
}  
}

do i need to use xml filter ?  
xml{  
source=\>message  
}  
pls advise the best suitable solution

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 2, 2018, 5:12pm UTC](https://discuss.elastic.co/t/need-to-parse-the-xml-data-via-logstash/147247/2 "2018-10-02T17:12:46Z")

</div>

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