-
Notifications
You must be signed in to change notification settings - Fork 254
Deprecating XML .gbt format; refactoring XML reading #807
Copy link
Copy link
Closed
Description
We will be deprecating the .gbt XML-based format written by the graphical interface in favour of other formats. At present the plan is that tools may continue to read the .gbt files but no longer write them from Gambit 17.
These are XML-based files (with a schema that has always been implicitly defined). These have been read and written by embedding a separate library tinyxml into the source code.
Note that actually the payload of defining the game in a .gbt file is actually just the .efg or .nfg file format. XML is used entirely to store GUI state, not the game itself.
To remove the dependency on this library, we will do the following:
- In the graphical interface, wxWidgets provides a collection of classes for dealing with XML documents; the reader and writer can be ported to use this for the graphical interface - which as noted above is the only substantive place this information is used anyway.
- In C++, we can write a simple function that scans an XML file for the
<efgfile>or<nfgfile>tags and attempts to extract the game from that segment. This would not do any parsing or validation of the whole file, but this would seem to be a small cost given our plans to move away from XML; if a file isn't valid XML but has a valid fragment that's an.efgor.nfgthere's no reason not to be able to read it! - In Python, we can use Python XML libraries to handle the reading and writing if desired. This may not be necessary given the previous point.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels