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