I have a pom.xml, that I want to change the properties values for tags that starting in a certain pattern.
I usually use xmlstarlet to manipulate XML bu
What you are interested in is the Xpath function starts-with. It is a standard function since Xpath 1.0. This allows you to do :
$ xmlstarlet ed -N N="http://maven.apache.org/POM/4.0.0" \ -u "//N:*[starts-with(name(),'company.mgrid')]" \ -v "0.9-SNAPSHOT" pom.xml