# How to parse few XML files with different number of tags in different files using Logstash?

**URL:** <https://discuss.elastic.co/t/how-to-parse-few-xml-files-with-different-number-of-tags-in-different-files-using-logstash/228156>\
**Category:** Logstash\
**Created:** [April 15, 2020, 3:34pm UTC](https://discuss.elastic.co/t/how-to-parse-few-xml-files-with-different-number-of-tags-in-different-files-using-logstash/228156 "2020-04-15T15:34:51Z")\
**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:** [April 15, 2020, 3:43pm UTC](https://discuss.elastic.co/t/how-to-parse-few-xml-files-with-different-number-of-tags-in-different-files-using-logstash/228156/2 "2020-04-15T15:43:31Z")

</div>

I would use a pattern that never matches so that you can consume the entire file as a single event. See [here](https://discuss.elastic.co/t/logstash-xml-filter-not-working-properly/176758/10) for an example.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-parse-few-xml-files-with-different-number-of-tags-in-different-files-using-logstash/228156)._
