# Load an xml files

**URL:** <https://discuss.elastic.co/t/load-an-xml-files/164647>\
**Category:** Logstash\
**Created:** [January 17, 2019, 2:23pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647 "2019-01-17T14:23:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alaoui](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Alaoui](https://discuss.elastic.co/u/Alaoui)\
**Post date:** [January 17, 2019, 2:23pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/1 "2019-01-17T14:23:49Z")

</div>

Hi,  
i want to load a 100 xml files in the same time using logstash, so what i should to add in my config file!.

---

<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:** [January 17, 2019, 2:59pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/2 "2019-01-17T14:59:58Z")

</div>

You will probably need to use a [file](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html) input and then an [xml](https://www.elastic.co/guide/en/logstash/current/plugins-filters-xml.html) filter.

---

<div class="post-metadata">

**Author:** ![Alaoui](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Alaoui](https://discuss.elastic.co/u/Alaoui)\
**Post date:** [January 17, 2019, 3:10pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/3 "2019-01-17T15:10:53Z")

</div>

i already load the first xml file using config file with input filter nd output but i want to create a config file that allow me to load all the xml files in the same time

---

<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:** [January 17, 2019, 3:12pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/4 "2019-01-17T15:12:13Z")

</div>

Have you tried a wildcard path in the file input?

---

<div class="post-metadata">

**Author:** ![Alaoui](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Alaoui](https://discuss.elastic.co/u/Alaoui)\
**Post date:** [January 17, 2019, 3:18pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/5 "2019-01-17T15:18:37Z")

</div>

no i dint . this is my config file :

input {  
file {  
path =\> "D:/test001.xml",  
start\_position =\> beginning  
sincedb\_path =\> "NUL"  
codec =\> multiline {  
pattern =\> "|"  
negate =\> "true"  
what =\> "previous"  
auto\_flush\_interval =\> 1  
max\_lines =\> 3000  
}

}  
}

filter {  
xml {  
source =\> "message"  
target =\> "message.parsed"  
store\_xml =\> false  
force\_array =\> false

}

}

output {  
stdout { codec =\> rubydebug }  
elasticsearch {  
index =\> "tizer005"  
hosts =\> ["localhost:9200"]  
document\_type =\> "ChannelFiles"  
}  
}

---

<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:** [January 17, 2019, 3:26pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/6 "2019-01-17T15:26:12Z")

</div>

> [@Alaoui](#):
>
> path =\> "D:/test001.xml"

OK, so if all the XML files are in the root of the D: drive then try

```
path => "D:/test*.xml"

```

---

<div class="post-metadata">

**Author:** ![Alaoui](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Alaoui](https://discuss.elastic.co/u/Alaoui)\
**Post date:** [January 17, 2019, 3:45pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/7 "2019-01-17T15:45:40Z")

</div>

i try it using csv files but it doesn t work ☹

---

<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:** [February 14, 2019, 3:55pm UTC](https://discuss.elastic.co/t/load-an-xml-files/164647/8 "2019-02-14T15:55:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
