in reply to XML::Generator loop
Also, I'm not sure why you are mixing XML::Simple (i.e. XMLout) and XML::Generator. I would use just one or the other.use XML::Generator; my $xml = new XML::Generator; my @list; while (<DATA>) { chomp; my ($m, $d) = split(' ', $_); push(@list, $xml->set( { label => $m, value => $d })); } print $xml->chart({ caption => 'Chart Title', subcaption => 'Subtitle' + }, @list); __END__ January 17400 February 19800 March 21800 April 23800 May 29600 June 27600 July 31800 August 39700 September 37800 October 21900 November 32900 December 39800
|
|---|