I have an XML file with the following line:
<VALUE DECIMAL_VALUE='0.2725' UNIT_TYPE='percent'/>
I would like to increment this value by .04 and keep the format of the XML in place. I know this is possible with a Perl or awk script, but I am having difficulty with the expressions to isolate the number.
If you’re on a box with the xsltproc command in place I would suggest you use XSLT for this.
For a Perl solution I’d go for using the DOM. Check this DOM Processing with Perl article out.
That said. If your XML file is produced in a predictable way something naïve like the following could work: