MCPcopy Create free account
hub / github.com/ActiveState/code / xmldict

Class xmldict

recipes/Python/576445_ElementTree_Wrapper/recipe-576445.py:210–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209def test1():
210 class xmldict(dict):
211 def __xml__(self):
212 xml_elt = xml('dict')
213 for key in self:
214 xml_elt.append(xml('dictent',xml('key',str(key)),
215 xml('value',str(self[key]))))
216 return xml_elt
217
218 e = xmldict()
219 e['foo'] = 'bar'

Callers 1

test1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected