# XML Parser failing -Logstash --- xsi:nil="true"

**URL:** <https://discuss.elastic.co/t/xml-parser-failing-logstash-xsi-nil-true/157600>\
**Category:** Logstash\
**Created:** [November 20, 2018, 5:54pm UTC](https://discuss.elastic.co/t/xml-parser-failing-logstash-xsi-nil-true/157600 "2018-11-20T17:54:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonsshah](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bonsshah](https://discuss.elastic.co/u/bonsshah)\
**Post date:** [November 20, 2018, 5:54pm UTC](https://discuss.elastic.co/t/xml-parser-failing-logstash-xsi-nil-true/157600/1 "2018-11-20T17:54:57Z")

</div>

I am trying to parse complete xml without xpath as there are many attributes so can not use xpath. Logstash XML parser is failing at below line of xml.

## ERROR :

## Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"mqm-payload-itemnew", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:0x28fcc44f], :response=\>{"index"=\>{"\_index"=\>"mqm-payload-itemnew", "\_type"=\>"doc", "\_id"=\>"JZM5MmcBO702AymzFyA3", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"mapper [payload.Body.CountryAttributes.Localization.Country.Gem\_SignOff] of different type, current\_type [text], merged\_type [ObjectMapper]"}}}}

Here is my Logstash XML parser detail

```
xml {
				source => "xmlmessagepayload"
				store_xml => true
				target => "payload"
				force_array => false
             }

```

I have tried to remove that xmlns:xsi..... Complete line from attribute and passed which works fine. ( I tried to find out root cause only)

I would really appreciate your input here to get it parse as is with  
( xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)" xsi:nil="true" )

Thanks  
Bons

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [November 21, 2018, 7:18am UTC](https://discuss.elastic.co/t/xml-parser-failing-logstash-xsi-nil-true/157600/2 "2018-11-21T07:18:31Z")

</div>

Hello,  
can you provide entire input logic, so that it would be easy to identify the problem and give solution.

Regards,  
Balu

---

<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:** [December 19, 2018, 7:18am UTC](https://discuss.elastic.co/t/xml-parser-failing-logstash-xsi-nil-true/157600/3 "2018-12-19T07:18:32Z")

</div>

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