Parsing the MAME XML

MAME's method of storing information about all its games is in the XML file, which is an absolute bear to look at. It's very organized, but almost to a fault. It's very huge, making it unweidly for text editors. Other applications that might want to use it also choke on its size. Luckily, it's faily easy to work around.

First thing we need is a converter to get this into a nicer format. JSON is what all the cool kids use, so we'll give that a go.

I'm using an xml2json library found here that suits my needs. We just need to get this into JSON, pick a tool that you like and run with it if you want. From there we convert from XML to JSON.

This loops through the massive JSON file and outputs each ROM set in its own file. From here we can import our JSON into some form of a database, read the files on their own, or pretty much whatever you want at this point.