Belizan
Jan 24, 2006, 07:08 PM
Anyone looked at the XML parsing capabilities in Python? I'm looking at wanting to add new classes of "things" and, given the expected release of the SDK, it seems to make sense to me to set them up in XML, but without an XML parser, that means no testing until the SDK. Anyone natively familiar with Python already deal with this issue one way or another? Personally, I'm not particularly eager (or necessarily even willing) to write an XML parser from base primitives just for this purpose :/.
FunkyMonkee
Jan 24, 2006, 10:39 PM
Anyone looked at the XML parsing capabilities in Python? I'm looking at wanting to add new classes of "things" and, given the expected release of the SDK, it seems to make sense to me to set them up in XML, but without an XML parser, that means no testing until the SDK. Anyone natively familiar with Python already deal with this issue one way or another? Personally, I'm not particularly eager (or necessarily even willing) to write an XML parser from base primitives just for this purpose :/.
Hi Belizan this seems similar at what I'm looking to do but for now using MS-Access. See my thread Importing CIV 4 XML into Ms-Access (http://forums.civfanatics.com/showthread.php?t=154797).
Sorry I'm not familiar with Python and can't help you directly. Maybe as an idea you could use a backend database and use Python as the interface. You could then export back into the CIV 4 XML format when required. This should help reduce the complexity of coding for the parsing of the XML data.
Basically I'm looking at using AltovaXML™ 2006 (http://www.altova.com/altovaxml.html.) to manage the XSLT transformation of the XML data files.
I suspect I lot of methodologies used for creating the CIV 4 utilities revolve about parsing the XML files to edit the required property.
What advantages does Python provide?
I'm assuming that CIV 4 was programmed in Python so if you want to create something as am add-on to CIV 4 could be a reason.
Cheers,
FunkyMonkee
:crazyeye:
TheLopez
Jan 24, 2006, 10:42 PM
Anyone looked at the XML parsing capabilities in Python? I'm looking at wanting to add new classes of "things" and, given the expected release of the SDK, it seems to make sense to me to set them up in XML, but without an XML parser, that means no testing until the SDK. Anyone natively familiar with Python already deal with this issue one way or another? Personally, I'm not particularly eager (or necessarily even willing) to write an XML parser from base primitives just for this purpose :/.
Belizan,
Follow this link and you will get all you need regarding Python XML parsing information:
http://www.python.org/sigs/xml-sig/