XML::RSS::Parser::Characters - an object representing a
package XML::RSS::Parser::Characters;
use strict;
use base qw(XML::Elemental::Characters);
use XML::RSS::Parser::Util qw(encode_xml);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
my $a = shift;
$self->data($a->{data}) if ($a);
$self;
}
sub as_xml { encode_xml($_[0]->data) }
###--- hack to keep Class::XPath happy.
sub qname { '' }
sub attributes { {} }
sub contents { () }
sub text_content { $_[0]->data; }
sub attribute_qnames { }
1;
__END__