New Jenkins versions are using xml version 1.1 for configuration files. I used XMLStarlet to manipulate these files from a Bash script but XMLStarlet doesn't support xml version 1.1
Do you know of any alternative to XMLStarlet?
New Jenkins versions are using xml version 1.1 for configuration files. I used XMLStarlet to manipulate these files from a Bash script but XMLStarlet doesn't support xml version 1.1
Do you know of any alternative to XMLStarlet?
Since I first posted this question I've found a couple of workarounds valid only if you're not using a xml 1.1 specific feature that is usually the case:
1st- xmlstarlet 2>/dev/null
xmlstarlet recognizes that xml 1.1 is unsupported and outputs a warning to STDERR (fd2) that you can see in the console. Redirecting (only) STDERR to dev/null makes the trick.
2nd- removing the xml 1.1 first line declaration in the file. According to the xml standard if the declaration is missing, the file is considered to be xml 1.0. Does a valid XML file require an XML declaration?
I got the same issue before, in my case I had to install jenkins job config.xml and edit it and then upload it again to Jenkins.
As a workaround to fix this issue I used to replace the version from version='1.1' to version='1.0' and then apply XmlStarlet command and before upload the file I return the version to be version='1.1'