HTML Parser which allows low-keyed local changes (upon serialization)

Tim Arnold tim.arnold at sas.com
Mon Feb 1 18:42:07 CET 2010


"Robert" <no-spam at non-existing.invalid> wrote in message 
news:hk729b$naa$1 at news.albasani.net...
> Stefan Behnel wrote:
>> Robert, 01.02.2010 14:36:
>>> Stefan Behnel wrote:
>>>> 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.
>>> of course it does not destroy during parsing.(?)
>>

I think I understand what you want, but I don't understand why yet. Do you 
want to view the differences in an IDE or something like that? If so, why 
not pretty-print both and compare that?
--Tim





More information about the Python-list mailing list