in reply to Re^2: HTML Parsing /Regex Qstn
in thread HTML Parsing /Regex Qstn

Roman - One more question.. How do i get the content directly inside the div tag..the stuff that is'nt in any of those inner tags?

Replies are listed 'Best First'.
Re^4: HTML Parsing /Regex Qstn
by bobr (Monk) on Jan 21, 2010 at 17:38 UTC
    You can traverse content_list of any element. Text is plain, while other tags are references.
    ... for my $part ($div->content_list) { print $part,"\n" if !ref($part); } ...
    If you want all text (including inner tags), you can use as_text method of elements. In this case it would also return title and date, but generally it is useful.

    --Roman

      Thanks!