光阴似箭催人老,日月如移越少年。
Consider using the ElementTree module to parse and modify your XML.
ElementTree
Reference documentation https://docs.python.org/2/lib...
xmltodict This package is very easy to use
A suggestion:
1.用1楼提到的那个包解析xml dom结构 2.利用这个dom写一个jinja的xml模板 3.用jinja自带的渲染函数render把变量渲染进去 4.写到文件,完成
Consider using the
ElementTree
module to parse and modify your XML.Reference documentation https://docs.python.org/2/lib...
xmltodict This package is very easy to use
A suggestion: