# Xml filter sometimes fails to parse files that have valid xml

**URL:** <https://discuss.elastic.co/t/xml-filter-sometimes-fails-to-parse-files-that-have-valid-xml/112758>\
**Category:** Logstash\
**Created:** [December 21, 2017, 7:17am UTC](https://discuss.elastic.co/t/xml-filter-sometimes-fails-to-parse-files-that-have-valid-xml/112758 "2017-12-21T07:17:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iam\_thadiyan](https://avatars.discourse-cdn.com/v4/letter/i/5f9b8f/32.png) [@iam\_thadiyan](https://discuss.elastic.co/u/iam_thadiyan)\
**Post date:** [December 21, 2017, 7:17am UTC](https://discuss.elastic.co/t/xml-filter-sometimes-fails-to-parse-files-that-have-valid-xml/112758/1 "2017-12-21T07:17:19Z")

</div>

I have the following xml - alot many of them, in fact.

```
<log>
  <message>
    <text>T1</text>
  </message>
  <message>
    <text>T2</text>
  </message>
</log>

```

Sometimes I see that the multiline code doesn't reach the end of the file. Because of this xml filter fails citing parsing error. The size of the file was \<2MB with 50k lines.

I was able to parse bigger files without any issue. I see this sporadically.

I have set the following in multiline codec as a precaution.  
max\_lines =\> 10000000  
max\_bytes =\> '200 MiB'

Nothing seems to work. I am not able to reproduce the issue consistently in the same file also. Any ideas?

---

<div class="post-metadata">

**Author:** ![iam\_thadiyan](https://avatars.discourse-cdn.com/v4/letter/i/5f9b8f/32.png) [@iam\_thadiyan](https://discuss.elastic.co/u/iam_thadiyan)\
**Post date:** [January 1, 2018, 1:17pm UTC](https://discuss.elastic.co/t/xml-filter-sometimes-fails-to-parse-files-that-have-valid-xml/112758/2 "2018-01-01T13:17:47Z")

</div>

Hi Can I get an answer?

---

<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 29, 2018, 1:17pm UTC](https://discuss.elastic.co/t/xml-filter-sometimes-fails-to-parse-files-that-have-valid-xml/112758/3 "2018-01-29T13:17:58Z")

</div>

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