My need is that I will have a user who will call functions and pass various value to that.
Those values would be converted as a hash and needs to be written to an xml file. For instance..
use Report;
$rep = Reporter->new();
my $id = "1";
my $value1 = "Some Process A";
$rep->getParameter($id,$value1);
#will do something
#will do something
my $id = "2";
my $value2 = "Some Process B";
$rep->getParameter($id,$value2);
Report will have something like
Report.pm
sub getParameter
{
my ($self, $id,$value) = @_;
my $hash = {
'Key' => $id,
'Value' => $value
};
#The idea is that I need to keep writing the values so obtained in an
+xml format..
}
The xml file
<Parameter key="1">Some Process A</Parameter>
<Parameter key="2">Some Process B</Parameter>
I need an XML module that will let me append these tags to the file, as and when the specific functions are called.
Which XML module would do this.. and a small sample of how to use it please..
Thanks,
Perllace
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.