Im trying to write a BAT file that will parse the MAME.XML file and obtain the "way" of the joystick (4 or 8 way) for a given rom that I will pass on as an argument to the BAT file.
This will be used to set the motorized restrictor plate of my joystick automatically.
I have tried the well known XPATH.BAT code out there to use a simple XPATH command but it does NOT work except to match the first line of the XML file for whatever reason. I think the XPATH.BAT is not robust as I keep getting odd results.
the XPATH command needed would be:
//machine[@name="pacman"]/control[@player="1"]/@ways
Anyone have any other ideas how to parse the XML file and obtain the joystick (4 or
way data for a given rom? I need it to be scriptable, and preferably in the BAT format for compatibility with my other scripts...