# Trouble parsing xml file

**URL:** <https://discuss.elastic.co/t/trouble-parsing-xml-file/153582>\
**Category:** Logstash\
**Created:** [October 23, 2018, 10:50am UTC](https://discuss.elastic.co/t/trouble-parsing-xml-file/153582 "2018-10-23T10:50:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [October 24, 2018, 10:34am UTC](https://discuss.elastic.co/t/trouble-parsing-xml-file/153582/2 "2018-10-24T10:34:58Z")

</div>

hope this helps you,

> [@Unable to load xml file in logstash](https://discuss.elastic.co/t/unable-to-load-xml-file-in-logstash/151318/5):
>
> The correct output is obtained for below input code, hope this helps other people, Also, max\_lines number changes based on the maximum number of lines present in your xml file input { file { path =\> "C:/Users/LENOVO/Downloads/stations.xml" start\_position =\> "beginning" sincedb\_path =\> "NUL" codec =\> multiline { pattern =\> "^\<?stations.\*\>" negate =\> "true" what =\> "previous" auto\_flush\_interval =\> 1 max\_lines =\> 3000 } } } filter { xml { source =\> "message" target =\> "pars…

---

_[View the full topic](https://discuss.elastic.co/t/trouble-parsing-xml-file/153582)._
