[XML-SIG] help please
Gisbert Amm
gia@webde-ag.de
Fri, 7 Mar 2003 11:13:39 +0100
> And generate xml file using python.
A simple example using minidom (a DOM implementation):
>>>from xml.dom.minidom import Document
>>>newdoc = Document()
>>> docindex = newdoc.createElement("docindex")
<DOM Element: docindex at 135900804>
>>> newdoc.appendChild(docindex)
<DOM Element: docindex at 136339140>
>>> newdoc.createElement("entry")
<DOM Element: entry at 136226028>
>>> docindex.appendChild(entry)
>>> newdoc.toxml()
'<?xml version="1.0" ?>\n<docindex><entry/></docindex>'
and so on :-) (see
http://python.org/doc/current/lib/module-xml.dom.minidom.html)
Regards
Gisbert Amm