ashok13123 has asked for the wisdom of the Perl Monks concerning the following question:
I am having an XML like this... I want to create a hash like<cat> <channel>CHANNEL123</channelName> <name>CATEGORY123</name> <shortName>TopCategory</shortName> <description>This is TopCategory channel's Category</description> <shortDescription>This is TopCategory channel's Category</shortDescrip +tion> <parentID>0</parentID> <categoryTags>Vod;Download</categoryTags> </cat> <cat> <channelName>Channel456</channelName> <name>cat456</name> <shortName>TopCategory</shortName> <description>This is TopCategory channel's Category</description> <shortDescription>This is TopCategory channel's Category</shortDescrip +tion> <parentID>0</parentID> <categoryTags>Vod;Download</categoryTags> </cat> <cat> <channelName>chann678</channelName> <name>cat678</name> <shortName>TopCategory</shortName> <description>This is TopCategory channel's Category</description> <shortDescription>This is TopCategory channel's Category</shortDescrip +tion> <parentID>0</parentID> <categoryTags>Vod;Download</categoryTags> </cat>
That is from each <cat>,I have to make channel=>name...How can i do that? Thanks in AdvanceCHANNEL123=>CATEGORY123 Channel456=>cat456 chann678=>cat678
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create hash from XML file
by dHarry (Abbot) on Jul 22, 2009 at 11:36 UTC | |
by psini (Deacon) on Jul 22, 2009 at 11:40 UTC | |
|
Re: Create hash from XML file
by toolic (Bishop) on Jul 22, 2009 at 12:19 UTC | |
|
Re: Create hash from XML file
by prasadbabu (Prior) on Jul 22, 2009 at 11:45 UTC | |
|
Re: Create hash from XML file
by Jenda (Abbot) on Jul 23, 2009 at 21:43 UTC |