# XML Document Parsing in ElasticSearch

**URL:** <https://discuss.elastic.co/t/xml-document-parsing-in-elasticsearch/21131>\
**Category:** Elasticsearch\
**Created:** [December 8, 2014, 5:39am UTC](https://discuss.elastic.co/t/xml-document-parsing-in-elasticsearch/21131 "2014-12-08T05:39:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritesh\_Ingale](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@Ritesh\_Ingale](https://discuss.elastic.co/u/Ritesh_Ingale)\
**Post date:** [December 8, 2014, 5:39am UTC](https://discuss.elastic.co/t/xml-document-parsing-in-elasticsearch/21131/1 "2014-12-08T05:39:40Z")

</div>

Hi,

I have a xml documents to be indexed. But it is available in two different formats.

Sample xml Document Format 1:

\<?xml version="1.0" encoding="UTF-8"?\> if i indexed the document of this format then elasticsearch is successfully detect the content type as "application/xml" and also give me document on search.

Sample xml Document Format 2:

Even if i have same data but present in following format of document then elasticsearch is not detecting the content type as well as not giving any document on search.

\<?xml version="1.0" encoding="UTF-8"?\> \<![CDATA[

Some Data Here...

Some Data Here...

]]\>

Kindly provide some clarity on the above mentioned scenarios.

---

<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, 12:45am UTC](https://discuss.elastic.co/t/xml-document-parsing-in-elasticsearch/21131/2 "2017-07-06T00:45:06Z")

</div>

Closed on July 6, 2017, 12:45am UTC


