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/\&/\&\;/g;
$data =~ s/\</\<\;/g;
$data =~ s/\>/\>\;/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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.