in reply to Issue in printing content type in XML

XML::Writer doesn't have a _tagChar method. It never has, as far as I can tell, and I went back to version 0.1 in 1999. It has dataElement for that purpose.

That means you're probably using a home grown module with the same name, so there's no telling what it does. But the most likely problem is that you are mistaken as to what $cContent contains.

Replies are listed 'Best First'.
Re^2: Issue in printing content type in XML
by Anonymous Monk on Sep 14, 2010 at 05:30 UTC
    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.

      Please help and advise again.

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