Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/XML-Output/Ruby/xml-output.rb
Normal file
18
Task/XML-Output/Ruby/xml-output.rb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
require 'rexml/document'
|
||||
include REXML
|
||||
|
||||
remarks = {
|
||||
%q(April) => %q(Bubbly: I'm > Tam and <= Emily),
|
||||
%q(Tam O'Shanter) => %q(Burns: "When chapman billies leave the street ..."),
|
||||
%q(Emily) => %q(Short & shrift),
|
||||
}
|
||||
|
||||
doc = Document.new
|
||||
root = doc.add_element("CharacterRemarks")
|
||||
|
||||
remarks.each do |name, remark|
|
||||
root.add_element("Character", {'Name' => name}).add_text(remark)
|
||||
end
|
||||
|
||||
# output with indentation
|
||||
doc.write($stdout, 2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue