]> git.sesse.net Git - xml-template/blob - python/attribute3.py
9c6ffbf50b3372fbd18ae957fe2f8a1461903722
[xml-template] / python / attribute3.py
1 #! /usr/bin/python
2 import xmltemplate
3
4 doc = xmltemplate.process_file("../xml/clone.xml", {
5         "color": "blue",
6         "#things": xmltemplate.alternate("li/class", [
7                 { "li": "Raindrops on roses" },
8                 { "li": "Whiskers on kittens" },
9                 None,
10                 { "li": "Bright copper kettles" },
11                 { "li": "Warm, woolen mittens"},
12         ], "odd", "even")
13 });
14 print doc.toxml()