# Logstash parsing XML failing on second and subsequent records

**URL:** <https://discuss.elastic.co/t/logstash-parsing-xml-failing-on-second-and-subsequent-records/308905>\
**Category:** Logstash\
**Created:** [July 5, 2022, 12:20pm UTC](https://discuss.elastic.co/t/logstash-parsing-xml-failing-on-second-and-subsequent-records/308905 "2022-07-05T12:20:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 5, 2022, 2:36pm UTC](https://discuss.elastic.co/t/logstash-parsing-xml-failing-on-second-and-subsequent-records/308905/2 "2022-07-05T14:36:30Z")

</div>

> [@Gerrard](#):
>
> I'm struggling to understand why logstash is unable to process any records beyond the first in my XML log file.

I suspect you are hitting [this](https://discuss.elastic.co/t/why-stdout-output-shows-message/214079/11) issue. The file input reads lines, and splitting the data into lines happens before the codec (and encoding) is applied, so it cannot properly process 16 bit characters.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-parsing-xml-failing-on-second-and-subsequent-records/308905)._
