[python] xmlbuilder
最近在測試官方版的xmlbuilder
寫法有兩種
1. with
x = XMLBuilder
with x.tag_name('value', attr1_name=attr1_value, ....):
with x.tag_name('value', attr1_name=attr1_value, ....):
...
這樣分層下去
2. <<
x << (tag_name, value, {attr1_name:attr1_value, ...})
記錄一下
寫法有兩種
1. with
x = XMLBuilder
with x.tag_name('value', attr1_name=attr1_value, ....):
with x.tag_name('value', attr1_name=attr1_value, ....):
...
這樣分層下去
2. <<
x << (tag_name, value, {attr1_name:attr1_value, ...})
記錄一下
Comments
Post a Comment