HTML Parser which allows low-keyed local changes?

Stefan Behnel stefan_ml at behnel.de
Mon Feb 1 03:34:28 EST 2010


Robert, 31.01.2010 20:57:
> I tried lxml, but after walking and making changes in the element tree,
> I'm forced to do a full serialization of the whole document
> (etree.tostring(tree)) - which destroys the "human edited" format of the
> original HTML code. makes it rather unreadable.

What do you mean? Could you give an example? lxml certainly does not
destroy anything it parsed, unless you tell it to do so.

Stefan



More information about the Python-list mailing list