]> git.sesse.net Git - xml-template/blobdiff - python/include.py
Add full range of Python regression tests.
[xml-template] / python / include.py
diff --git a/python/include.py b/python/include.py
new file mode 100644 (file)
index 0000000..0c87fba
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/python
+import xmltemplate
+
+doc = xmltemplate.process_file("../xml/included.xml", {
+       "color": "red"
+}, False)
+master = xmltemplate.process_file("../xml/master.xml", {
+       "title": "Main HTML title",
+       "h1": "Nice heading here",
+       "contents": doc
+});
+print master.toxml()