# WWW::Extractor::XML::Text - a section of text in an XML / XHMTL / HTML document

package WWW::Extractor::XML::Element::Text;

use strict;
use vars qw(@ISA);

use HTML::Entities;

# new WWW::Extractor::XML::Text($text)

@ISA = qw|WWW::Extractor::XML::Element|;

sub new {
    my ($class, $text) = @_;

    return bless {
	text=>$text
    }, $class;
}

sub type {
    return 'T';
}

sub as_string {
    my $self = shift;
    return HTML::Entities::encode_entities($self->{text});
}

1
