Thanks a lot GrandFather. But when I am running this code, I am getting following error,
" Name "main::DATA" used only once: possible typo at xml_parser.pl line 8.
readline() on unopened filehandle DATA at xml_parser.pl line 8.
no element found at line 1, column 0, byte -1 at C:/Perl/site/lib/XML/Parser.pm
line 187"
Please help.
Thanks.
Comment on Re^2: parsing xml file and get the values
Click on the readmore link in my previous node and you will discover a __DATA__ section that contains your, slightly edited, original sample XML. Read I know what I mean. Why don't you? to understand why I used the __DATA__ section and read Writeup Formatting Tips to learn about formatting your node and things like code tags and readmore tags.