FWIW, if you are certain that all XML files need their first 2 occurrences of "console" changed to "serial" then the attached script worked for me.
FWIW, if you are certain that all XML files need their first 2 occurrences of "console" changed to "serial" then the attached script worked for me.