Apache-AxKit-Provider-DOM
view release on metacpan or search on metacpan
}
#------------------------------------------------------------------------#
# pseudo noops #
#------------------------------------------------------------------------#
sub mtime { return time; }
sub has_changed { return 1; }
sub key { return 'dom_provider'; }
sub get_fh {
throw Apache::AxKit::Exception::IO( -text => "Can't get fh for Scalar" );
}
#------------------------------------------------------------------------#
# get_strref #
#------------------------------------------------------------------------#
# The DOM provider returns the string value of the document tree if a
# document is present, otherwise it throws an error
#
sub get_strref {
my $self = shift;
if ( defined $self->{dom_tree} ) {
my $str = $self->{dom_tree}->toString;
$self->{apache}->pnotes('dom_tree' => $self->{dom_tree} );
return \$str;
}
else {
throw Apache::AxKit::Exception::IO( -text => "Can't get the XML DOM" );
}
}
1;
__END__
=head1 NAME
( run in 0.238 second using v1.01-cache-2.11-cpan-496ff517765 )