[Israel.pm] Editing an HTML fragment

sawyer x xsawyerx at gmail.com
Sun Aug 26 07:46:57 PDT 2012


On Sun, Aug 26, 2012 at 5:17 PM, Shmuel Fomberg <shmuelfomberg at gmail.com>wrote:

>
> I have an part of HTML that I need to edit.
>>> Currently, I'm wrapping it in
>>> '<html><head></head><body>'.$str.'</body></html>',
>>> and the use HTML::TreeBuilder to parse, modify, and dump it back to text.
>>> and then I remove the enclosing tags.
>>>
>>> It works pretty well so far, but is there a better way?
>>>
>>
>> Yes, there is!
>> HTML::Zoom!
>>
>
> Ah, nice one. CSS selectors will rule the world!
> I see that all the examples are with full html. will it accept html part?
>

TIAS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20120826/ffa5f6a1/attachment.htm 


More information about the Perl mailing list