in reply to Re: Issue in printing content type in XML
in thread Issue in printing content type in XML
and the characters sub of XML::Writer looks like thissub _tagChar { my $self = shift; my ($tag, $data) = @_; return unless(defined($tag) && defined($data)); vverbose(9,"Tag: ($tag), Data: ($data)"); $self->xml->startTag("$tag"); $self->xml->characters($data); $self->xml->endTag("$tag"); }
but the question here is again when I take the data in a variabled themy $characters = sub { my $data = $_[0]; if ($data =~ /[\&\<\>]/) { $data =~ s/\&/\&\;/g; $data =~ s/\</\<\;/g; $data =~ s/\>/\>\;/g; } &{$escapeEncoding}($data); $output->print($data); $hasData = 1; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Issue in printing content type in XML
by ikegami (Patriarch) on Sep 14, 2010 at 05:44 UTC |