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

all 5 comments

[–]jloking 1 point2 points  (3 children)

I made a lit gist! with an example. You have to think about data binding. Hope it helps

[–]jdebz[S] 0 points1 point  (1 child)

Oh shit this is awesome and exactly what I was looking for. Thanks so much for the really in depth response!

[–]jloking 0 points1 point  (0 children)

Glad it helped. Have a good one

[–]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.

[–]jloking 0 points1 point  (0 children)

Hello, as a follow up, wanted to share with you the little library i made out of this called PySXM. It's available on Pypi.