E.g.:
$ cordova create test
Creating a new cordova project.
$ cd test
$ sed -i 's|<content src="index.html" />|<content src="index.html" /> <!-- my very important comment -->|' config.xml
$ npx cordova-set-version -v 1.2.3 config.xml
$ cat config.xml | grep important
<no output>
Less bad, but still annoying, is that all whitespace (e.g. line breaks to group related sections in the file) is ignored, and the file is reformatted according to some beauty ideal.