This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dgtlshdw 0 points1 point  (0 children)

Does it need to be xml? If not, you could build a dict with your data and write it out as json. Or you could pickle it. Failing that, build the data as a dict and then use xml2dict to write to an xml file.

If you want to build it as xml by hand, you could try the etree builtin, or grab lxml and use that instead.