X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=python%2Finclude.py;fp=python%2Finclude.py;h=0c87fba879a750765b67c040baefc98dd41930e9;hb=e5976d9f22b2579cf679ab8aeba79fd107c9b48a;hp=0000000000000000000000000000000000000000;hpb=45e891552925659588f499e2d9f4ac90fe3d7753;p=xml-template diff --git a/python/include.py b/python/include.py new file mode 100644 index 0000000..0c87fba --- /dev/null +++ b/python/include.py @@ -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()