# XML filter doesnt parse PacketBeat output

**URL:** <https://discuss.elastic.co/t/xml-filter-doesnt-parse-packetbeat-output/69045>\
**Category:** Logstash\
**Created:** [December 14, 2016, 4:12pm UTC](https://discuss.elastic.co/t/xml-filter-doesnt-parse-packetbeat-output/69045 "2016-12-14T16:12:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vasyl](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vasyl](https://discuss.elastic.co/u/Vasyl)\
**Post date:** [December 14, 2016, 4:12pm UTC](https://discuss.elastic.co/t/xml-filter-doesnt-parse-packetbeat-output/69045/1 "2016-12-14T16:12:54Z")

</div>

Hello,

I have Packetbeat that ships data to logstash. In the http body from PacketBeat I have XML that I want to apply xml filter, but it doesn't seem to work. Here is the configuration.

filter {  
xml {  
source =\> "body"  
target =\> "xmlfile"  
}  
}

This is what I receive in logstash.

"body" =\> "\<?xml version=\"1.0\" encoding=\"UTF-8\"?\>\n\n Update\n \n \n \n \n \n service\n \n \n \n \n \n \n serviceO\n \n 0\n \n \n \n serviceO\n \n 4\n \n \n \n \n \n \n \n serviceO\n \n 0\n \n \n \n service\n \n 31\n \n \n \n \n \n \n \n \n \n origin\n \n 9633\n \n \n \n originTime\n \n \<dateTime.iso8601\>20161007T06:13:14-0700\</dateTime.iso8601\>\n \n \n \n sd\n \n 11111111111\n \n \n \n originNode\n \n SUSE\n \n \n \n originHostName\n \n SUSE\n \n \n \n origin\n \n AAA\n \n \n \n \n \n \n",

Any advise or suggestion is much appreciated.

P.S. When I feed same XML through file input all works well.

---

<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:** [January 11, 2017, 4:12pm UTC](https://discuss.elastic.co/t/xml-filter-doesnt-parse-packetbeat-output/69045/2 "2017-01-11T16:12:57Z")

</div>

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