]> git.sesse.net Git - xml-template/blob - python/attribute2.py
4f25464b6e17932e62a426deda6cc783cfeb394c
[xml-template] / python / attribute2.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                 { "li": "Bright copper kettles" },
10                 { "li": "Warm, woolen mittens"},
11         ], "odd", "even")
12 });
13 print doc.toxml()