How to edit Macros externally and re-import?

I exported a macro group and edited in Atom, then saved. Atom opened the .kmmacros file as a "Property List (XML). I did a search and replace and saved over the .kmmacros file. KM gave this error when I attempted to import it:

How can I get the edited .kmmocros file back into Keyboard Maestro?

Edit: I tried several other formats including straight "XML", without success.

You might try using BBEdit and edit as a text file.
I've done this a number of times with success.

As long as you have not changed something required by KM, then it should work.