Re: XML parsing and writing

2006-08-29 Thread Fredrik Lundh
someone wrote: >> Nice package ElementTree is but sadly it doesn't have a pretty print, >> well, guess I'll have to do it myself, if you have one already can you >> please give it to me? thanks :) http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/indent.py -- http://mail.pytho

Re: XML parsing and writing

2006-08-29 Thread Stefan Behnel
c00i90wn wrote: > Stefan Behnel wrote: >> c00i90wn wrote: >>> Hey, I'm having a problem with the xml.dom.minidom package, I want to >>> generate a simple xml for storing configuration variables, for that >>> purpose I've written the following code, but before pasting it I'll >>> tell you what my pr

Re: XML parsing and writing

2006-08-28 Thread uche . ogbuji
c00i90wn wrote: > Nice package ElementTree is but sadly it doesn't have a pretty print, > well, guess I'll have to do it myself, if you have one already can you > please give it to me? thanks :) FWIW Amara and plain old 4Suite both support pretty-print, canonical XML print and more such options.

Re: XML parsing and writing

2006-08-01 Thread Jim
c00i90wn wrote: On first write of the xml everything goes > as it should but on subsequent writes it starts to add more and more > unneeded newlines to it making it hard to read and ugly. Pretty make it pretty by putting in newlines (and spaces) that are not in the original data. That is, if you

Re: XML parsing and writing

2006-07-31 Thread c00i90wn
Nice package ElementTree is but sadly it doesn't have a pretty print, well, guess I'll have to do it myself, if you have one already can you please give it to me? thanks :) Stefan Behnel wrote: > c00i90wn wrote: > > Hey, I'm having a problem with the xml.dom.minidom package, I want to > > generate

Re: XML parsing and writing

2006-07-31 Thread Stefan Behnel
c00i90wn wrote: > Hey, I'm having a problem with the xml.dom.minidom package, I want to > generate a simple xml for storing configuration variables, for that > purpose I've written the following code, but before pasting it I'll > tell you what my problem is. On first write of the xml everything goe