Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/XML-Output/Perl/xml-output.pl
Normal file
19
Task/XML-Output/Perl/xml-output.pl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#! /usr/bin/perl
|
||||
use strict;
|
||||
use XML::Mini::Document;
|
||||
|
||||
my @students = ( [ "April", "Bubbly: I'm > Tam and <= Emily" ],
|
||||
[ "Tam O'Shanter", "Burns: \"When chapman billies leave the street ...\"" ],
|
||||
[ "Emily", "Short & shrift" ]
|
||||
);
|
||||
|
||||
my $doc = XML::Mini::Document->new();
|
||||
my $root = $doc->getRoot();
|
||||
my $studs = $root->createChild("CharacterRemarks");
|
||||
foreach my $s (@students)
|
||||
{
|
||||
my $stud = $studs->createChild("Character");
|
||||
$stud->attribute("name", $s->[0]);
|
||||
$stud->text($s->[1]);
|
||||
}
|
||||
print $doc->toString();
|
||||
Loading…
Add table
Add a link
Reference in a new issue