I have an xml file beginning with
<?xml version='1.0' encoding='utf-8'?>
<widget
id="io.ionic.starter"
version="0.0.1"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
>
I need to add a ios-CFBundleVersion="de.test" attribute so it should look like this:
<?xml version='1.0' encoding='utf-8'?>
<widget
id="io.ionic.starter"
version="0.0.1"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
ios-CFBundleVersion="de.test"
>
I've tried it with xmlstarlet:
xmlstarlet edit \
-O \
--inplace \
--insert "widget" \
--type attr \
-n ios-CFBundleVersion \
-v de.test \
config.xml
but nothing happens in my file config.xml. What would be the correct xmlstarlet command here?