# Logstash XML

**URL:** https://discuss.elastic.co/t/logstash-xml/192452
**Category:** Logstash
**Created:** [July 26, 2019, 1:51pm UTC](https://discuss.elastic.co/t/logstash-xml/192452 "2019-07-26T13:51:48Z")
**Posts on this page:** 1
**Showing post:** 4

<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, 2019, 2:56pm UTC](https://discuss.elastic.co/t/logstash-xml/192452/4 "2019-07-26T14:56:57Z")

</div>

That will result in an event that has this message field

```
<books>\n <book>\n <name>HarryPotter</name>\n <id>785</id>\n <numero>7</numero>\n </book>

```

That is not valid XML. You could use [mutate+gsub](https://discuss.elastic.co/t/how-to-handle-xml-file-last-unconsumed-characters-error/188385/11) to fix it.

Since you did not enable auto\_flush\_interval the second book element will never get flushed.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-xml/192452)._
