Re: cleanup (X)HTML-code

2006-09-18 Thread patrickk
thanks malcolm, jay. your suggestions are very helpful. patrick Am 17.09.2006 um 19:15 schrieb Jay Parlar: > > On 9/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> Is your input guaranteed to be well-formed XHTML? If so, ElementTree >> (http://effbot.org/zone/element-index.htm ) will be

Re: cleanup (X)HTML-code

2006-09-17 Thread Jay Parlar
On 9/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Is your input guaranteed to be well-formed XHTML? If so, ElementTree > (http://effbot.org/zone/element-index.htm ) will be faster, particularly > cElementTree. It always feels very Pythonic when you program with it, so > it gets ease-of-u

Re: cleanup (X)HTML-code

2006-09-17 Thread Malcolm Tredinnick
On Sun, 2006-09-17 at 13:14 +0200, patrickk wrote: > I´m having large text fields where an editor can post xhtml-code. > right now, I´m using rich text editing for that area (mostly fck, but > also tinymce). > I´m looking for suggestions on how to cleanup the xhtml-code: > - delete empty parag

cleanup (X)HTML-code

2006-09-17 Thread patrickk
I´m having large text fields where an editor can post xhtml-code. right now, I´m using rich text editing for that area (mostly fck, but also tinymce). I´m looking for suggestions on how to cleanup the xhtml-code: - delete empty paragraphs - no text outside paragraphs/headlines/lists ... - head