... and the method still works for Mame 0.227. Someone should write a utility to make the job a little quicker? 
I created this tool for Windows years ago and will update it in the future.
The "Utility" section includes an export function that uses different names for XML nodes based on the target MAME release number; perhaps this can help.
The replacement procedure (via ps, bash, cmd) can corrupt files, which should not be edited like normal text files.
In detail, this is the correct replacement pattern: from
<machine name=" to
<game name="Including the "name" attribute prevents errors. If the "name" attribute appears in the middle of the attribure list of the node, the entire process will produce an invalid XML file.
I've attached a screenshot of the tool, now tested on the latest version of Mame.
You can do almost everything anonymously; no login is required.
I hope this helps while we wait for the MALA fix.
This is the link to download page of my website:
https://adb.arcadeitalia.net/?page=download