Parsing Exceptions in savegame XML file...

Synchronized-turns strategy. Calling all teamers.
Post Reply
User avatar
mentor09
Luxer
Posts: 330
Joined: Wed Feb 11, 2009 3:41 am
Location: Germany
Contact:

Parsing Exceptions in savegame XML file...

Post by mentor09 » Sat Dec 11, 2010 4:38 am

When I started analyzing the ALEXANDER map i got

Code: Select all

$ ./analyzeGame.py 
Traceback (most recent call last):
  File "./analyzeGame.py", line 795, in <module>
    frame = DoodleFrame(filename)
  File "./analyzeGame.py", line 766, in __init__
    xmldoc = minidom.parse(filename)
  File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 22, column 32
Obviously the "&" character is not changed to "&" while writing the XML File...

Code: Select all

$ grep "&"  ~/CastleVoxPC/Support/SavedGames/ALEXANDER\ round\ 1.vox 
	<player id="5" name="Italians & Greeks" agent="Human" controlledBy="jesterme" money="21" color="0.7411764705882353/0.1607843137254902/0.1411764705882353" /> 
	<continentname>Peloponnese & Allies</continentname> 
	<continentname>Illyrii & Getae</continentname> 
	<continentname>Macedon & Thrace</continentname> 
	<continentname>Mesoptamia & Syria</continentname> 
	<continentname>Parthia & Persis</continentname> 
	<continentname>Messagetae & Khwarazmians</continentname> 
	<continentname>Bactria & Sogdiana</continentname> 
Can you fix that, Dustin ?

Post Reply