insert comments into elementtree

Tim Arnold tim.arnold at
Mon Nov 19 18:45:20 CET 2007

"Stefan Behnel" <stefan.behnel-n05pAM at> wrote in message 
news:473DDF5B.2020801 at
> Tim Arnold wrote:
>> Hi, I'm using the TidyHTMLTreeBuilder to generate some elementtrees from
>> html. One by-product is that I'm losing comments embedded in the html.
> That's how the parser in ET works. Use lxml instead, which keeps documents
> intact while parsing.
> Stefan

Thanks Stefan, I certainly would use lxml if I could get everything to 
compile on this HPux10.20.
I did manage to get this one solved by inserting the comments back in like 

--Tim Arnold

More information about the Python-list mailing list