# Elastic Search( Store XML data as just a string)

**URL:** https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386
**Category:** Elasticsearch
**Created:** [August 5, 2024, 1:15pm UTC](https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386 "2024-08-05T13:15:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![apoorvleo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apoorvleo/32/136268_2.png) [@apoorvleo](https://discuss.elastic.co/u/apoorvleo)
#### Post date: [August 5, 2024, 1:15pm UTC](https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386/1 "2024-08-05T13:15:55Z")

</div>

Hi Team,  
I am using kibana and ES versions 8.14.

I am sending a json through Java Bulk call API  
{"uuid": string type  
instance: string type  
inputJson : JsonNode type  
xmlmxmessage: xmlbutinStringformat  
}

this is the mapping for xmlmxmessage.

```auto

"xmlmxmessage":{
"type":"text",
fields:{
"keyword:{
"type":"keyword",
"ignore_above":256
}
}

```

but when I create a Kibana data view of this and add a new field with link to open link on a new tab, shows the complete xml but removes all the tags and becomes a big string.

But when I few the xmlmxmessage as field and check the value it has the xml.

I also have a doubt if my xmlmxmessage is saved as text, is it analysed or indexable? I don't want it to indexed.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 5, 2024, 6:50pm UTC](https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386/2 "2024-08-05T18:50:12Z")

</div>

You can mark the text field as not indexed (see [index | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html)). Also remove the keyword sub field. It's not needed.

---

<div class="post-metadata">

### Author: ![apoorvleo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apoorvleo/32/136268_2.png) [@apoorvleo](https://discuss.elastic.co/u/apoorvleo)
#### Post date: [August 7, 2024, 12:34pm UTC](https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386/3 "2024-08-07T12:34:15Z")

</div>

How can I remove the field keyword subfield?  
Also what is the best way to store xml data(without being indexed) and to be used just to view data.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [August 7, 2024, 1:12pm UTC](https://discuss.elastic.co/t/elastic-search-store-xml-data-as-just-a-string/364386/4 "2024-08-07T13:12:27Z")

</div>

You need to provide the right mapping when you create the index.
