For a file-driven project, I wanted to convert from "CFG" to "XML", and I believe Python does not support either of these types.
There was a colleague who did the modification manually, so we could study the XML. Here are the respective CFG and XML structures:
CFG: link
XML: link
Well I'm sort of a "go-between" in Python, but I have a problem with HOW I'm going to do it. I've read the source of ConfigParser and I saw that it used the re module, but how do I use this module.
Anyway, do I have to invent a parser for both? If you can not send me a code (of course you can not), but can you tell me the following idea?
I was thinking of doing this:
Identify in CFG the data types, what is Section and what is Given . < Create a sort of temporary dictionary with the received data.
Then rewrite the data in an XML file according to separate types. Creating an XML tree.