http://www.perlmonks.org?node_id=928814


in reply to Hash Table genaration using perl

It is wonderful that you have posted your XML input data as a sample. You haven't posted any Perl code and quite honestly if you are trying to get the monks here to do your work for you I'm not sure that's going to happen.

If you want broad stroke advice on how to approach the problem, let me take a whack at it for you:


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re^2: Hash Table genaration using perl
by veerubiji (Sexton) on Sep 30, 2011 at 15:30 UTC

    I am trying like this, i am reading xml and i am extracting but i dnt know how to extract each test description and sotre it in a string. Each test description starts with data number like <data> then how to extract each description and store it in a string.I am beginer to perl.

      Take a look at XML::Simple for reading in the XML. It'll work better than greedy regexes.


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

        give any idea regarding store data into string and hash table creation . it helps alot for me.

        Hi, i tried with xml::simple i posted my code above but I want my ouput like test number and their description below. like

        testnumber 0437 <description> testnumber 0438 <description>.....
        description is in xml format