in reply to Re: New Line of Modules
in thread New Line of Modules
I'm adding a feature to change it from allowing an exclude list to allowing either an exclude list or an "exclude all except..." list. If the previous code was given:use YAPE::HTML; $p = YAPE::HTML->new($CONTENT); 1 while $p->next; # to build the tree @exclude = qw( a img ); $level = 2; for ($p->root) { # top-level elements print $_->fullstring(\@exclude, $level); }
then output would be:<b>Hi <i>there <s>folks!</s></i></b> <br><br> Visit my <img src="naked_woman.jpg"><a href="http://www.pornsite.com/">porn site</a>!
The <s> tag was removed because it was 3 layers down, and I requested only 2 layers.<b>Hi <i>there folks!</i></b> <br><br> Visit my porn site!
|
|---|