# Logstash XML Filter Output

**URL:** <https://discuss.elastic.co/t/logstash-xml-filter-output/227099>\
**Category:** Logstash\
**Created:** [April 8, 2020, 10:42am UTC](https://discuss.elastic.co/t/logstash-xml-filter-output/227099 "2020-04-08T10:42:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksremo](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@ksremo](https://discuss.elastic.co/u/ksremo)\
**Post date:** [April 8, 2020, 10:42am UTC](https://discuss.elastic.co/t/logstash-xml-filter-output/227099/1 "2020-04-08T10:42:30Z")

</div>

Hello,  
i have a xml encoded logfile which is transferd with filebeat to logstash.  
in the logstash pipeline i use the xml-filter.  
the output looks like: ` Event.Client-IP-Address	{ "content": "10.x.x.x", "data_type": "3" }`  
Input line looks like: `<Event><Client-IP-Address data_type=3>"10.x.x.x<Client-IP-Address/><Event/>`  
And Filter: `filter { xml { source => "message" target => "Event" } } `  
But i want to fill the Field Event.Client-IP-Address with just the xml content field and ignore data\_type.

How can i do this?

---

<div class="post-metadata">

**Author:** ![Rahul\_Ravichandran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_ravichandran/32/53882_2.png) [@Rahul\_Ravichandran](https://discuss.elastic.co/u/Rahul_Ravichandran)\
**Post date:** [April 8, 2020, 1:00pm UTC](https://discuss.elastic.co/t/logstash-xml-filter-output/227099/2 "2020-04-08T13:00:14Z")

</div>

Try mutate filter [https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html)

---

<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 6, 2020, 1:00pm UTC](https://discuss.elastic.co/t/logstash-xml-filter-output/227099/3 "2020-05-06T13:00:26Z")

</div>

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