Re: newbie: minidom

2006-11-17 Thread Uche Ogbuji
Paul Watson wrote: > Explicit [XML declaration] is better than implicit. Yes indeed. "Always use an XML declaration" http://www-128.ibm.com/developerworks/xml/library/x-tipdecl.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fo

Re: newbie: minidom

2006-11-11 Thread Fredrik Lundh
Paul Watson wrote: >> why? the documents are equivalent, and any XML application that >> requires an explicit UTF-8 encoding declaration is broken. > > Explicit is better than implicit. inventing your own XML standard is no way better than using the existing one. -- http://mail.python.org

Re: newbie: minidom

2006-11-11 Thread Paul Watson
Fredrik Lundh wrote: > Danny Scalenotti wrote: > >> I'm not able to get out of this ... >> >> from xml.dom.minidom import getDOMImplementation >> >> impl = getDOMImplementation() // default UTF-8 >> doc = impl.createDocument(None, "test",None) >> root = doc.documentElement >> root.setAttribu

Re: newbie: minidom

2006-11-10 Thread Paul Boddie
Danny Scalenotti wrote: > I'm not able to get out of this ... > > > from xml.dom.minidom import getDOMImplementation > > impl = getDOMImplementation() // default UTF-8 > doc = impl.createDocument(None, "test",None) > root = doc.documentElement Here, you're actually getting a reference to the

Re: newbie: minidom

2006-11-10 Thread Fredrik Lundh
Danny Scalenotti wrote: > I'm not able to get out of this ... > > from xml.dom.minidom import getDOMImplementation > > impl = getDOMImplementation() // default UTF-8 > doc = impl.createDocument(None, "test",None) > root = doc.documentElement > root.setAttribute('myattrib', '5') > > print

newbie: minidom

2006-11-10 Thread Danny Scalenotti
I'm not able to get out of this ... from xml.dom.minidom import getDOMImplementation impl = getDOMImplementation() // default UTF-8 doc = impl.createDocument(None, "test",None) root = doc.documentElement root.setAttribute('myattrib', '5') print root.toxml() I obtain why not this?