in reply to Re: Issue in printing content type in XML
in thread Issue in printing content type in XML

Sorry for creating the confusion here, the _tagChar is the subroutine written by me only
and it looks like this
sub _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"); }
and the characters sub of XML::Writer looks like this
my $characters = sub { my $data = $_[0]; if ($data =~ /[\&\<\>]/) { $data =~ s/\&/\&amp\;/g; $data =~ s/\</\&lt\;/g; $data =~ s/\>/\&gt\;/g; } &{$escapeEncoding}($data); $output->print($data); $hasData = 1; };
but the question here is again when I take the data in a variabled the
value doesnt get replaced and if I pass the hardcode value it gets replaced
i.e. application/pdf
Please help and advise again.

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

    Please help and advise again.

    Nothing's changed. I'm sticking to my earlier diagnosis.