Main > Software Forum
Aaron removes xml2info as of u12 (in other words, we are screwed)
krick:
I have the xml2info.c file that I submitted with my patch to 106u11 to work with the new XML changes.
I've built an exe too that should work as long as the XML doesn't drastically change in the future.
You can get them both here...
http://mame.3feetunder.com/xml2info/
EDIT#1: Oops!, I might have spoke too soon. I didn't notice that uRebelScum added additional control info to the XML. I'll have to test it with 106u12 and see if it crashes or not. I'm assuming it will need a little tweaking. Stay tuned.
EDIT#2: Yep. It's broke real good. Not sure how to fix this one. The xml2info code was very fragile and dependent on the order of the items. The new control tag is nested inside of the input tag and therefore won't get processed until the entire input tag is processed first. Not good. I'll keep looking at it but *if* I can get it working, it's gonna be *really* ugly code. It would probably be faster to re-write it from scratch using a DOM package. I'm quite familiar with JDOM. Maybe I'll give it a try in JAVA when I get more time.
EDIT#3: I have something working. It's not 100% optimal but it works. See my post further down in this thread.
Howard_Casto:
--- Quote from: Lilwolf on July 16, 2006, 09:41:41 pm ---I have to say... you can also just parse the xml... not hard and its a lot more useful.
It has been the standard for 2 years. Took me about 15 minutes to parse it... another hour to replace the old parser with the xml parser. You shouldn't be afraid of XML... just wonder why people use it when speeds on the line.
--- End quote ---
I must be dumb or something. I haven't looked into it seriously but this evening I downloaded several xml parsers and example code. While I can parse any old piece of xml easily I can't get mame's listxml to parse. Is mame's output fully xml compliant?
For the record, I don't like xml because it's in-general larger and slower than virtually any format out there. Mind you the listinfo format is a complete mess, but considering the work was already done I never saw any point in converting. I still don't unedrstand why mame couldn't have outputted plain old text (think list info without all the stupid tabs and formatting characters).
krick:
--- Quote from: Howard_Casto on July 16, 2006, 11:02:48 pm ---
I must be dumb or something. I haven't looked into it seriously but this evening I downloaded several xml parsers and example code. While I can parse any old piece of xml easily I can't get mame's listxml to parse. Is mame's output fully xml compliant?
--- End quote ---
The DTD at the top of the listxml output is broken currently so the XML doesn't conform. It's an easy fix.
See this post...
http://www.mameworld.info/ubbthreads/showthreaded.php?Number=80169
Howard_Casto:
yeah figured that out and promptly deleted the whole mess as it isn't really needed if you know the xml version.
Even so every other parser I try seems to have some issue with listxml. I found one that works, but it's a manual parser, so it should. ;)
krick:
--- Quote from: Howard_Casto on July 16, 2006, 11:24:09 pm ---Even so every other parser I try seems to have some issue with listxml. I found one that works, but it's a manual parser, so it should. ;)
--- End quote ---
If you find parsers that complain, let me know what they complain about. It's probably something legitimate that needs to be fixed.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version