Hey All,

I am trying to design some scripts using the module - XML::Parser

To start  learning I have a very basic scenario. Suppose I have following
XML file:

<root>
<tag1>My Tag1</tag1>
<tag2>My Tag2</tag2>
<tag3>My Tag3</tag3>
</root>

I want to save the the tags as the keys of a Hash and respective content as
the  value of that hash

So for the above XML file using the module XML::Parser, I would like to
create a hash having following key/value pair:

my %my_hash = (
        tag1 => 'My Tag1',
        tag2 => 'My Tag2',
        tag3 => 'My Tag3',
    );

Is that possible?

Cheers,
Parag

Reply via email to