# 1 XML file to 1 Document

**URL:** <https://discuss.elastic.co/t/1-xml-file-to-1-document/25909>\
**Category:** Logstash\
**Created:** [July 20, 2015, 1:04pm UTC](https://discuss.elastic.co/t/1-xml-file-to-1-document/25909 "2015-07-20T13:04:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_D](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Daniel\_D](https://discuss.elastic.co/u/Daniel_D)\
**Post date:** [July 20, 2015, 1:04pm UTC](https://discuss.elastic.co/t/1-xml-file-to-1-document/25909/1 "2015-07-20T13:04:55Z")

</div>

This is more of an architectural question.  
Should I use LS for this scenario?  
I need to watch a directory for incomig XML files, each file will be one Document.  
I need to keep roughly 75% of the content after XPathing around.

Thanks for your suggestions,  
Daniel

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 20, 2015, 4:35pm UTC](https://discuss.elastic.co/t/1-xml-file-to-1-document/25909/2 "2015-07-20T16:35:42Z")

</div>

None of the stock plugins support this use case in a good way. I'd say it's easier to write a script for the XML consumption and then feed the file contents to Logstash via e.g. TCP or another file.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:34am UTC](https://discuss.elastic.co/t/1-xml-file-to-1-document/25909/3 "2017-07-06T05:34:14Z")

</div>

Closed on July 6, 2017, 5:34am UTC


