[EMAIL PROTECTED],

I am trying to a text output of a remote web page, but I don't know exactly
how to do this.  The text outputs, but if their is a table within it (even a
text table), it returns a [Table Not Shown] within the text output.  Any
ideas?

Here is the sniplet of code I am using:

$ua = new LWP::UserAgent;
$request = new HTTP::Request('GET', "$url");
$response = $ua->request($request);

if ($response->is_success)
 {
   $html = $response->content;

   $tree = HTML::TreeBuilder->new->parse($html);
   $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50);

   $text = $formatter->format($tree);
   print ("$text");
 }
else
 { print $response->error_as_HTML; }



which outputs:

this is a sentance in a web page. welcome to my web page, etc ,etc
[TABLE NOT SHOWN]
more text in web page, and so on.

Thanks,
Jack

Reply via email to