# Indexing xm files in text field (html\_strip)

**URL:** <https://discuss.elastic.co/t/indexing-xm-files-in-text-field-html-strip/84111>\
**Category:** Elasticsearch\
**Created:** [April 30, 2017, 2:24pm UTC](https://discuss.elastic.co/t/indexing-xm-files-in-text-field-html-strip/84111 "2017-04-30T14:24:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rso249](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rso249/32/41992_2.png) [@rso249](https://discuss.elastic.co/u/rso249)\
**Post date:** [April 30, 2017, 2:24pm UTC](https://discuss.elastic.co/t/indexing-xm-files-in-text-field-html-strip/84111/1 "2017-04-30T14:24:48Z")

</div>

I have a case. We must index xml files. Its not important to map and seperate the elements. The xsd is very complicated with more then 8000 lines... Converting it to json is really a pain and I think we will get many errors. I need only the raw text. So I thought I index the xml in a text field and using the html\_strip I can get only the text that I need. I have read that the text type supports as max length 32.000 characters.. Some xml files are huge... What is the best solution in my case? As I wrote using xpath or converting this complicated xml in json its really complicated and I only need the plain text. No need to know the elements.  
Thank you!!!

---

<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:** [May 28, 2017, 2:31pm UTC](https://discuss.elastic.co/t/indexing-xm-files-in-text-field-html-strip/84111/2 "2017-05-28T14:31:00Z")

</div>

Closed on May 28, 2017, 2:31pm UTC

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