Galactopedia rejects PlanetImprovements.xml

After updating the Dark Avatar beta to version 0.20.026, my Galactopedia utility reports an XML read error at this location:

GalCiv2\DarkAvatar\Data\English\PlanetImprovements.xml
Line 1958: An XML comment cannot contain '--'

Looking at this file, there are indeed a bunch of "--" character sequences embedded in an XML comment. That's illegal according to the XML specification, and Microsoft's .NET XML parser unfortunately cannot be persuaded to ignore this issue (even with IgnoreComments enabled and validation disabled).

When the "--" sequences are replaced with single "-" characters, the file is parsed just fine. I could write a specialized string reader to do that, but of course it would be much simpler if you guys changed those bits in the XML file. (I'm a bit surprised that your XML editors and parsers didn't already complain.)

Thanks!
5,576 views 10 replies
Reply #1 Top
what the heck is galactopedia?
Reply #2 Top
what the heck is galactopedia?


See the sticky.
Reply #3 Top
Galactopedia (http://www.kynosarges.de/Galactopedia.html) is a small useful program "providing you with exhaustive information on all objects and technologies defined by the game. The information is taken directly from the game’s data files" (the sites reads). It is especially useful for DA, given that the wikia site is not up to date, so it is difficult to have access to all the figures (tech cost, improvement cost and effect, etc.).
I guess the syntax error reported in planetimprovements.xml (wich I also have encountered) is quite esay to fix, but I don't know how.

So please if anyone could help ...
Thank you
Reply #4 Top
Easy fix on your side: just delete the double dashes from the file PlanetImprovements.xml.

Open the file in Notepad or whatever, then jump to the indicated line numbers (1958-1962 in the current release) and delete one dash from each double-dash pair within the comment block. Alternatively, delete the entire comment.

There's a theoretical possibility that this change might cause trouble at the next Stardock update but I don't think they even check the present state of individual files. You'll probably just have to reapply this change.

Otherwise... please bitch at Stardock so that they fix this completely trivial issue on their side! I'm not going to write a specialized parser just to ignore five syntactically illegal dashes in a comment block...
Reply #5 Top
Ok, it is quite easy to fix indeed.
Sorry for the unnecessary post (newbie plague ...)
Reply #6 Top
Is this going to be fixed by Stardock aswell?
Reply #7 Top
Although the extra characters do not affect things when we read in the file, the double dashes have been removed since it is affecting you guys.  Thanks for the heads up.  The change will be reflected in a future update.

Charles
Reply #8 Top
Thanks! And Charles, will we have to put the old file back for the update to be successful? Or will your new PlanetImprovements.xml file simply write over the one we've modified?

-HM
Reply #9 Top
The new one we provide in a future update will just replace (overwrite) the one you currently have, regardless of whether or not you have modified it from its original form.

-C
Reply #10 Top
Sounds great; thanks!

-HM