# Split XML

**URL:** <https://discuss.elastic.co/t/split-xml/204949>\
**Category:** Logstash\
**Created:** [October 23, 2019, 7:55pm UTC](https://discuss.elastic.co/t/split-xml/204949 "2019-10-23T19:55:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Melaniemj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/melaniemj/32/56477_2.png) [@Melaniemj](https://discuss.elastic.co/u/Melaniemj)\
**Post date:** [October 24, 2019, 2:31am UTC](https://discuss.elastic.co/t/split-xml/204949/2 "2019-10-24T02:31:09Z")

</div>

From what I can tell split doesn't easily support xml.

If you have multiple values in the same message, which is what I think you're saying, then you could try parsing the xml _then_ running the split over the results - as suggested in [this post](https://discuss.elastic.co/t/how-to-split-xml-arrays/51944).

Just note that you can't run the xml filter on invalid xml, so you would have to wrap the row items in a containing tag before putting it through the xml plugin.

e.g.

> add\_field =\> {"newfield" =\> "\<something\>%{message}\</something\>"}

---

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