# How to remove a xml attribute in xml filter?

**URL:** <https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959>\
**Category:** Logstash\
**Created:** [January 12, 2016, 9:52am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959 "2016-01-12T09:52:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudeesh](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sudeesh](https://discuss.elastic.co/u/Sudeesh)\
**Post date:** [January 12, 2016, 9:52am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/1 "2016-01-12T09:52:42Z")

</div>

XML File:  
i want to remove the tag test-method which contains attribute is-config=true. This tag is repeated. I only want to get the value of the name=testcaseName from the tag test-method.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/1a8e5f121894395b9b908a218c4e938a1f3f0b75.jpg)  
Conf file:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/15217d01bb5b9844aac4dd8b02c2c57444c98762.jpg)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 11:05am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/2 "2016-01-12T11:05:36Z")

</div>

Next time please copy/paste the text. Don't post screenshots. Your configuration is barely legible.

You're explicitly extracting the is-config attribute in your xml filter, so if you don't want that attribute why not just stop extracting it? Or am I misunderstanding the problem?

---

<div class="post-metadata">

**Author:** ![Sudeesh](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sudeesh](https://discuss.elastic.co/u/Sudeesh)\
**Post date:** [January 12, 2016, 11:46am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/3 "2016-01-12T11:46:40Z")

</div>

I don't want to display the tag 'test-method' contain 'is-config=true' in elasticsearch. Please give a solution for this.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 12:06pm UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/4 "2016-01-12T12:06:29Z")

</div>

Again, the is-config attribute is only extracted from the XML text because you explicitly have configured Logstash to do that. If you don't want that attribute in a field, don't extract it; just extract the name and status attributes.

---

<div class="post-metadata">

**Author:** ![Sudeesh](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sudeesh](https://discuss.elastic.co/u/Sudeesh)\
**Post date:** [January 14, 2016, 9:45am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/5 "2016-01-14T09:45:52Z")

</div>

'status=pass' and 'name=testcaseName' i want to update these attribute value into db.  
name=reEnterURL and staus=pass don't want to update in db. So i used the xpath and tried remove option.

---

<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, 5:15am UTC](https://discuss.elastic.co/t/how-to-remove-a-xml-attribute-in-xml-filter/38959/6 "2017-07-06T05:15:43Z")

</div>


