import xmltemplate
doc = xmltemplate.process_file("../xml/clone.xml", {
- 'color': 'blue',
- '#things': (
- { "li": "Raindrops on roses", "li/class": "even" },
- { "li": "Whiskers on kittens", "li/class": "odd" },
- { "li": "Bright copper kettles", "li/class": "even" },
- { "li": "Warm, woolen mittens", "li/class": "odd" }
- )
+ 'color': 'red',
+ '#things': [
+ { "li": "Raindrops on roses", "li/class": "odd" },
+ { "li": "Whiskers on kittens", "li/class": "even" },
+ { "li": "Bright copper kettles", "li/class": "odd" },
+ { "li": "Warm, woolen mittens", "li/class": "even" }
+ ]
})
print doc.toxml()