# Xml filter: create filter definition based on xsd

**URL:** https://discuss.elastic.co/t/xml-filter-create-filter-definition-based-on-xsd/141581
**Category:** Logstash
**Created:** [July 25, 2018, 1:23pm UTC](https://discuss.elastic.co/t/xml-filter-create-filter-definition-based-on-xsd/141581 "2018-07-25T13:23:35Z")
**Posts on this page:** 1
**Showing post:** 7

<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 26, 2018, 12:35pm UTC](https://discuss.elastic.co/t/xml-filter-create-filter-definition-based-on-xsd/141581/7 "2018-07-26T12:35:57Z")

</div>

If you want to consume an entire file as a single event then you will need to use a multiline filter. There is an example [here](https://discuss.elastic.co/t/trying-to-parse-xml-logs/132749/2?u=badger). If you do not use a multiline filter then each line of the file will be a separate event.

The event will contain the contents of the file (either a single line, or the output of the multiline) in a field called "message", so that should be the source for you xml filter.

---

_[View the full topic](https://discuss.elastic.co/t/xml-filter-create-filter-definition-based-on-xsd/141581)._
