in reply to XML::Write challenges
You need to post a complete SSCCE because this works for me.
#!/usr/bin/perl use strict; use XML::Writer; printf "OS=%s Perl=%s XML::Writer=%s\n",$^O,$^V,$XML::Writer::VERSION; my $writer = XML::Writer->new(); my $cContactPhone = 13824898944; my $cContactEmail = 'abctest@abc.com'; $writer->startTag("Contact", "Type" => "Information", "Phone" => $cContactPhone, "Email" => $cContactEmail ); $writer->characters('I am here to ask questions'); $writer->endTag("Contact");
output:
OS=MSWin32 Perl=v5.16.1 XML::Writer=0.625 <Contact Type="Information" Phone="13824898944" Email="abctest@abc.com">I am here to ask questions</Contact>poj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Write challenges
by denzilhere (Initiate) on Feb 04, 2019 at 08:47 UTC | |
by holli (Abbot) on Feb 04, 2019 at 08:56 UTC | |
by poj (Abbot) on Feb 04, 2019 at 09:23 UTC | |
by Aldebaran (Curate) on Feb 05, 2019 at 20:24 UTC |