I don't know what DTD is, but you can count on them adding fields to the XML info every few revisions.
The listinfo option was removed from MAME some time ago, the XML file is generated via the -listxml option.
You might look at how MAME itself parses out the listxml info. The last I looked at it, MAME used the free expat library for parsing.
The
ListGen utility I wrote uses a flex/bison based parser and is much faster that the MAME library. It is, however, more subject to breaking when the XML changes.
HTH,
Buddabing