# Indexing and Searching XML documents

**URL:** <https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725>\
**Category:** Elasticsearch\
**Created:** [March 17, 2015, 10:17pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725 "2015-03-17T22:17:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkat\_Ankam](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@Venkat\_Ankam](https://discuss.elastic.co/u/Venkat_Ankam)\
**Post date:** [March 17, 2015, 10:17pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/1 "2015-03-17T22:17:39Z")

</div>

I have a requirement to index and search millions of XML documents related  
to mortgage (Uniform Closing Dataset XMLs).

Indexed data will be requested by a web services of many internal  
applications through REST API.

Output should be in XML format.

How do I implement this in ELK stack? How to convert XML input to JSON and  
how to get output in XML format?

Request you to share any examples related this scenario.

Regards,  
Venkat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 17, 2015, 10:46pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/2 "2015-03-17T22:46:24Z")

</div>

It strongly depends on the method how you want to convert XML to JSON and  
vice versa.

Maybe this plugin can give you some hints about Jackson XML regarding  
parsing and formatting

> **[GitHub - jprante/elasticsearch-xml: XML interface for Elasticsearch REST](https://github.com/jprante/elasticsearch-xml)**
>
> XML interface for Elasticsearch REST . Contribute to jprante/elasticsearch-xml development by creating an account on GitHub.

Do not expect XML schema, validation, or XSL stylesheet, this is not  
included.

Jörg

On Tue, Mar 17, 2015 at 11:17 PM, Venkat Ankam [venkat@cloudwick.com](mailto:venkat@cloudwick.com) wrote:

> I have a requirement to index and search millions of XML documents related  
> to mortgage (Uniform Closing Dataset XMLs).
> 
> Indexed data will be requested by a web services of many internal  
> applications through REST API.
> 
> Output should be in XML format.
> 
> How do I implement this in ELK stack? How to convert XML input to JSON  
> and how to get output in XML format?
> 
> Request you to share any examples related this scenario.
> 
> Regards,  
> Venkat
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGPWOG9J6qa9rnOVBfzjGORL3oKpR%3DmNrzj4oTNkEQW9Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGPWOG9J6qa9rnOVBfzjGORL3oKpR%3DmNrzj4oTNkEQW9Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 17, 2015, 11:13pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/3 "2015-03-17T23:13:38Z")

</div>

You can use Logstash to change the XML into JSON, but you will need to do  
the JSON to XML output yourself.

On 17 March 2015 at 15:17, Venkat Ankam [venkat@cloudwick.com](mailto:venkat@cloudwick.com) wrote:

> I have a requirement to index and search millions of XML documents related  
> to mortgage (Uniform Closing Dataset XMLs).
> 
> Indexed data will be requested by a web services of many internal  
> applications through REST API.
> 
> Output should be in XML format.
> 
> How do I implement this in ELK stack? How to convert XML input to JSON  
> and how to get output in XML format?
> 
> Request you to share any examples related this scenario.
> 
> Regards,  
> Venkat
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Venkat\_Ankam](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@Venkat\_Ankam](https://discuss.elastic.co/u/Venkat_Ankam)\
**Post date:** [March 18, 2015, 5:33pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/4 "2015-03-18T17:33:56Z")

</div>

Thanks Jorg and Mark for the response.

I am actually trying to evaluate both Solr Cloud and Elastic Search for  
this use case.

While Solr handles XML input and output automatically, Elasticsearch needs  
data to be converted to JSON format.

Are there any good reasons why I should consider Elasticsearch over Solr?

Regards,  
Venkat

On Tue, Mar 17, 2015 at 5:13 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> You can use Logstash to change the XML into JSON, but you will need to do  
> the JSON to XML output yourself.
> 
> On 17 March 2015 at 15:17, Venkat Ankam [venkat@cloudwick.com](mailto:venkat@cloudwick.com) wrote:
> 
> > I have a requirement to index and search millions of XML documents  
> > related to mortgage (Uniform Closing Dataset XMLs).
> > 
> > Indexed data will be requested by a web services of many internal  
> > applications through REST API.
> > 
> > Output should be in XML format.
> > 
> > How do I implement this in ELK stack? How to convert XML input to JSON  
> > and how to get output in XML format?
> > 
> > Request you to share any examples related this scenario.
> > 
> > Regards,  
> > Venkat
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ\_mYJ\_YQyrxg8NXwyuQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ_mYJ_YQyrxg8NXwyuQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 18, 2015, 7:06pm UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/5 "2015-03-18T19:06:31Z")

</div>

I do not understand what you mean by "Solr handles XML input and output  
automatically". You have to set up Solr schema and configuration to process  
your XML documents.

My plugin does not convert XML to JSON. It makes Elasticsearch understand  
XML natively by using a streaming parser that processes documents with an  
XML parser, and using an XML build procedure for formatting documents.

You should decide for yourself. Try both Elasticsearch and Solr, and I am  
sure you will find a solution that will suit your requirements best.

Jörg

On Wed, Mar 18, 2015 at 6:33 PM, Venkat Ankam [venkat@cloudwick.com](mailto:venkat@cloudwick.com) wrote:

> Thanks Jorg and Mark for the response.
> 
> I am actually trying to evaluate both Solr Cloud and Elastic Search for  
> this use case.
> 
> While Solr handles XML input and output automatically, Elasticsearch needs  
> data to be converted to JSON format.
> 
> Are there any good reasons why I should consider Elasticsearch over Solr?
> 
> Regards,  
> Venkat
> 
> On Tue, Mar 17, 2015 at 5:13 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:
> 
> > You can use Logstash to change the XML into JSON, but you will need to do  
> > the JSON to XML output yourself.
> > 
> > On 17 March 2015 at 15:17, Venkat Ankam [venkat@cloudwick.com](mailto:venkat@cloudwick.com) wrote:
> > 
> > > I have a requirement to index and search millions of XML documents  
> > > related to mortgage (Uniform Closing Dataset XMLs).
> > > 
> > > Indexed data will be requested by a web services of many internal  
> > > applications through REST API.
> > > 
> > > Output should be in XML format.
> > > 
> > > How do I implement this in ELK stack? How to convert XML input to JSON  
> > > and how to get output in XML format?
> > > 
> > > Request you to share any examples related this scenario.
> > > 
> > > Regards,  
> > > Venkat
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ\_mYJ\_YQyrxg8NXwyuQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ_mYJ_YQyrxg8NXwyuQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ\_mYJ\_YQyrxg8NXwyuQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVHyg3A5mRpFS%2Byr0j7G0MZayTqE4eJ_mYJ_YQyrxg8NXwyuQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHEkkQWmfBRhhxdt3YoqA%3DsH7qCSrK6M9-gqheLhbahLA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHEkkQWmfBRhhxdt3YoqA%3DsH7qCSrK6M9-gqheLhbahLA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:25am UTC](https://discuss.elastic.co/t/indexing-and-searching-xml-documents/22725/6 "2017-07-06T00:25:45Z")

</div>


