paragkalra has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use XML::Parser
by graff (Chancellor) on May 11, 2010 at 06:29 UTC | |
|
Re: How to use XML::Parser
by Jenda (Abbot) on May 11, 2010 at 10:32 UTC | |
|
Re: How to use XML::Parser
by ambrus (Abbot) on May 11, 2010 at 08:35 UTC | |
|
Re: How to use XML::Parser
by Anonymous Monk on May 11, 2010 at 06:17 UTC | |
|
Re: How to use XML::Parser
by ikegami (Patriarch) on May 19, 2010 at 23:18 UTC | |
|
Re: How to use XML::Parser
by paragkalra (Scribe) on May 11, 2010 at 06:28 UTC | |
by Anonymous Monk on May 11, 2010 at 06:36 UTC | |
|
Re: How to use XML::Parser
by paragkalra (Scribe) on May 19, 2010 at 22:44 UTC |