# Xml to elasticsearch by logstash

**URL:** <https://discuss.elastic.co/t/xml-to-elasticsearch-by-logstash/126859>\
**Category:** Logstash\
**Created:** [April 5, 2018, 6:58am UTC](https://discuss.elastic.co/t/xml-to-elasticsearch-by-logstash/126859 "2018-04-05T06:58:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seungtae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seungtae/32/71413_2.png) [@seungtae](https://discuss.elastic.co/u/seungtae)\
**Post date:** [April 5, 2018, 6:58am UTC](https://discuss.elastic.co/t/xml-to-elasticsearch-by-logstash/126859/1 "2018-04-05T06:58:52Z")

</div>

Is there anyone to help??

Please give me a example about xml filter..

I want to parse this xml source.

```
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
<m2m:cin
	xmlns:m2m=\"http://www.onem2m.org/xml/protocols\"
	xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
	<ty>4</ty>
	<ri>CI00000000001244656716</ri>
	<rn>CI00000000001244656716</rn>
	<pi>CT00000000000000046769</pi>
	<ct>2018-02-05T15:06:30+09:00</ct>
	<lt>2018-02-05T15:06:30+09:00</lt>
	<ppt>
		<gwl>36.83115, 127.11185, 76</gwl>
		<geui>0017b2fffe0ad93e</geui>
	</ppt>
	<sr>/0240771000000168/v1_0/remoteCSE-00000168000c05c016104807/container-LoRa//subscription-SS00000000000000261472</sr>
	<et>2018-02-06T15:06:30+09:00</et>
	<st>11785</st>
	<cr>RC00000000000000050648</cr>
	<cnf>LoRa/Sensor</cnf>
	<cs>76</cs>
	<con>010400003039499602d2499602d203e703e70000000003e703e70000000000000000fff51234</con>
</m2m:cin>

```

I want only information about con tags. Like this:  
_con : 010400003039499602d2499602d203e703e70000000003e703e70000000000000000fff51234_

My Logstash conf setting is like this :

```
 input {
	http{
		
	}
}
filter {
	xml {
	
	}
}

output {
	elasticsearch {
		index => "parse"
		hosts => "localhost:9200"
	}
	stdout {
		codec => rubydebug
	}
}
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 5, 2018, 7:22am UTC](https://discuss.elastic.co/t/xml-to-elasticsearch-by-logstash/126859/2 "2018-04-05T07:22:43Z")

</div>

Please don't post the same question again and again. Let the matter be resolved in the existing thread ([Please give me a example about Logstash xml filter](https://discuss.elastic.co/t/please-give-me-a-example-about-logstash-xml-filter/126837)).

---

<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:** [May 3, 2018, 7:22am UTC](https://discuss.elastic.co/t/xml-to-elasticsearch-by-logstash/126859/3 "2018-05-03T07:22:48Z")

</div>

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