You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to remove arg1 tag only if the content matches value1. The current rewrite-xml receipe has RemoveXmlTag which removes only the specified tags from the xml and does not match the values.
Describe the solution you'd like
The xPath matcher should support matching the content.
Have you considered any alternatives or workarounds?
A simple workaround is to introduce a new variable, say 'valueMatcher' in RemoveXmlTag and match the tag content with it.
Additional context
Here is a list of xPath syntax which has an example of xPath which can also match the content of the xml tag.
What problem are you trying to solve?
I have a xml like below,
I want to remove arg1 tag only if the content matches value1. The current rewrite-xml receipe has RemoveXmlTag which removes only the specified tags from the xml and does not match the values.
Describe the solution you'd like
The xPath matcher should support matching the content.
Have you considered any alternatives or workarounds?
A simple workaround is to introduce a new variable, say 'valueMatcher' in RemoveXmlTag and match the tag content with it.
Additional context
Here is a list of xPath syntax which has an example of xPath which can also match the content of the xml tag.
Are you interested in contributing this feature to OpenRewrite?
Yes. I will work on the solution and send a PR.
The text was updated successfully, but these errors were encountered: