in reply to Is the span tag supported by HTML:Treebuilder

you should add
return HTML::Element::OK;
at the end of the callback subroutine to keep traversing the tree, your code stops at the first tag

Replies are listed 'Best First'.
Re: Answer: Is the span tag supported by HTML:Treebuilder
by ChilliHead (Monk) on Jan 22, 2001 at 18:24 UTC
    I was already returning a value of 1 to make it loop through the tree but that was one of the lines I cut for brevity. I changed it to return HTML::Element::OK but it still does not work. It will pick out all the other tags that I've tried (such as div, a, b)

    CH
      it works fine for me, with SPAN and a with few other tags i tested, did you tried with other pages? it could be due to errors in the html syntax...
        it does work with other sites!
        Damn, thats the last time I try to download the headlines from ZDNet.

        thanks for your help
        CH