| 1 | # $Id: HTML.pm,v 1.1.1.1 2002/05/29 22:03:41 matt Exp $ | ||
| 2 | |||
| 3 | package AxKit::Provider::HTML; | ||
| 4 | |||
| 5 | @ISA = qw(Apache::AxKit::Provider::File); | ||
| 6 | $VERSION = '1.0'; | ||
| 7 | |||
| 8 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use XML::LibXML; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 0 | ▶ | use Apache::AxKit::Provider::File; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 11 | use Apache::AxKit::Exception; | ||
| 12 | |||
| 13 | sub get_fh { | ||
| 14 | throw Apache::AxKit::Exception ( -text => "get_fh not supported for HTML provider" ); | ||
| 15 | } | ||
| 16 | |||
| 17 | sub get_strref { | ||
| 18 | my $self = shift; | ||
| 19 | |||
| 20 | my $file = $self->{file}; | ||
| 21 | my $parser = XML::LibXML->new(); | ||
| 22 | my $doc = $parser->parse_html_file($file); | ||
| 23 | my $str = $doc->toString; | ||
| 24 | return \$str; | ||
| 25 | } | ||
| 26 | |||
| 27 | 1; | ||
| 28 | __END__ | ||