How to remove a xml attribute in xml filter?


(SK) #1

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.


Conf file:


(Magnus Bäck) #2

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?


(SK) #3

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


(Magnus Bäck) #4

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.


(SK) #5

'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.


(system) #6