techtween has asked for the wisdom of the Perl Monks concerning the following question:
I have an XML file of the form,
<?xml version="1.0" encoding="UTF-8"?> <testResults version="1.2"> <httpSample t="704" lt="704" ts="1306146504248" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-1" dt="text" by="411"/> <httpSample t="525" lt="525" ts="1306146505234" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-2" dt="text" by="411"/> <httpSample t="586" lt="586" ts="1306146611316" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-1" dt="text" by="411"/> <httpSample t="523" lt="523" ts="1306146612307" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-2" dt="text" by="411"/> <httpSample t="507" lt="507" ts="1306146613306" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-3" dt="text" by="411"/> <httpSample t="535" lt="535" ts="1306146615306" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-5" dt="text" by="411"/> <httpSample t="526" lt="526" ts="1306146506234" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-3" dt="text" by="411"/> <httpSample t="499" lt="498" ts="1306146507234" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-4" dt="text" by="411"/> <httpSample t="505" lt="505" ts="1306146508234" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-5" dt="text" by="411"/> <httpSample t="536" lt="536" ts="1306146509249" s="true" lb="HTTP Requ +est" rc="200" rm="OK" tn="Thread Group 2-6" dt="text" by="411"/> </testResults>
In perl, i need output for the above in the following form, lt = 704 lt = 525 lt max value = 704 lt min value = 525 lt average value = lt = 586 lt = 523 lt = 507 lt max value = 586 lt min value = 507 lt average value = lt = 535 lt = 526 lt = 498 lt = 505 lt = 536 lt max value = 536 lt min value = 498 lt average value = kindly help..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: group and print data seperately
by Corion (Patriarch) on May 24, 2011 at 15:37 UTC | |
|
Re: group and print data seperately
by toolic (Bishop) on May 24, 2011 at 15:37 UTC | |
|
Re: group and print data seperately
by wind (Priest) on May 24, 2011 at 15:47 UTC |