develooper Front page | perl.libwww | Postings from April 2001

documentation of ignore_tags in HTML::Parser 3.19_94

Thread Previous | Thread Next
From:
Nathaniel Irons
Date:
April 2, 2001 01:32
Subject:
documentation of ignore_tags in HTML::Parser 3.19_94
Message ID:
20010331165846-r01010600-137ab53d@216.9.7.186
I updated to the latest available HTML::Parser, hoping the new
ignore_tags() method would alleviate some distressingly rare
interruptions by rogue P tags in my documents:

    <b>merrily merrily merrily until <p> none of this is seen by
    the text event following the initial B tag.</b>

P tags don't figure into my parsing of these files, so by my initial
reading of ignore_tags("p"), I expected to get all of the above in the
first text event.  As I discovered, though the start event won't fire
for the P tag, the text event ends in the same place regardless.

I assume this was the desired outcome, and I suggest the ignore_tags()
description would benefit from a sentence spelling it out in greater
detail.  The word "suppressed" in particular implies to me that the
event has been completely scrubbed.  Perhaps:

    Any start and end events involving any of the given tags will
    not fire (but will continue to interact with neighboring events
    as if they had).

Of course, I think it'd be great if ignored tags acted as if they'd been
deleted from the page en masse before parsing began, but that
undertaking is beyond my ken.

Thanks, it's a lovely module.

  -nat

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About