Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: DaemonCollector on September 14, 2004, 08:30:00 am

Title: Using MAME to read XML File
Post by: DaemonCollector on September 14, 2004, 08:30:00 am
Does anyone have enough experiance with the MAME code to tell me how it reads XML Files? I can understand a lot of the other core code and such. But how can I read in a custom XML file?
Title: Re:Using MAME to read XML File
Post by: Buddabing on September 14, 2004, 11:57:22 am
Does anyone have enough experiance with the MAME code to tell me how it reads XML Files? I can understand a lot of the other core code and such. But how can I read in a custom XML file?

Hello,

The MAME devs are now using the Expat (http://expat.sourceforge.net/) XML parser library. It is a general purpose XML parser.

For custom XML files, you can build a fast parser with Flex (http://www.gnu.org/software/flex/) and Bison (http://www.gnu.org/software/bison/).

I've got a sample application which replaces the xml2info MAME utility, and which runs much faster than the original. It is here (http://home.houston.rr.com/buddabing/xml2info.zip).

My new application, a control panel image generator, has three separate parsers, two of which are XML parsers which parse the controls.xml file and the MAME ctrlr files. You can find the source to that project here (http://home.houston.rr.com/buddabing/cpmaker.zip).

Regards,
Buddabing
Title: Re:Using MAME to read XML File
Post by: DaemonCollector on September 14, 2004, 05:49:04 pm
Thank you much, *cracks knuckles and dives back into source*