Re: Problem round-tripping with xml.dom.minidom pretty-printer

2008-02-29 Thread Ben Butler-Cole
> The last line of p() calls itself: it is an unconditional recursive call > so, no matter what it does, it will never stop. And since p() also > prints something, calling it will print endlessly. Sorry, I wasn't clear. I realize that this recurses endlessly. The problem is that it also adds blank

Problem round-tripping with xml.dom.minidom pretty-printer

2008-02-29 Thread Ben Butler-Cole
Hello I have run into a problem using minidom. I have an HTML file that I want to make occasional, automated changes to (adding new links). My strategy is to parse it with minidom, add a node, pretty print it and write it back to disk. However I find that every time I do a round trip minidom's pr