Re: XML root node attributes

2009-11-18 Thread Slafs
Thanks But this doesn't work. I've ended using something like this: import xml.etree.ElementTree as ET root = ET.Element("root", dict(a='v', b='v2', c='v3')) n = ET.SubElement(root,'d') tree = ET.ElementTree(root) import sys tree.write(sys.stdout) On 17 Lis, 15:36, Stefan Behnel wrote: > Slafs

RE: XML root node attributes

2009-11-17 Thread Matt Mitchell
Subject: XML root node attributes Hi I'm little confused about adding attributes to the root node when creating an XML document. Can I do this using minidom or something else. I can't find anything that would fit my needs. i would like to have something like this: P

Re: XML root node attributes

2009-11-17 Thread Stefan Behnel
Slafs, 17.11.2009 15:19: > I'm little confused about adding attributes to the root node when > creating an XML document. > Can I do this using minidom or something else. Yes, you /can/, but you /should/ use something else. > I can't find anything that would fit my needs. > > i would like to hav

XML root node attributes

2009-11-17 Thread Slafs
Hi I'm little confused about adding attributes to the root node when creating an XML document. Can I do this using minidom or something else. I can't find anything that would fit my needs. i would like to have something like this: Please help. Regards. -- http://mail.python.or