]> git.sesse.net Git - xml-template/blobdiff - python/namespace.py
Hand-merge from borked repository. Main changes are a Ruby version (with
[xml-template] / python / namespace.py
diff --git a/python/namespace.py b/python/namespace.py
new file mode 100644 (file)
index 0000000..2216578
--- /dev/null
@@ -0,0 +1,11 @@
+#! /usr/bin/python
+import xmltemplate
+
+doc = xmltemplate.process_file("../xml/namespace.xml", {
+       'title': 'Namespace tests',
+       '#hello': 'Hello world!',
+       '#test': 'Replaced.',
+       'tagname': 'foo',
+       '#moretest': 'bar'
+})
+print doc.toxml()