September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
18
Task/XML-Output/Zkl/xml-output.zkl
Normal file
18
Task/XML-Output/Zkl/xml-output.zkl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
fcn xmlEscape(text){
|
||||
text.replace(" &"," &") .replace(" \""," "")
|
||||
.replace(" '"," '") .replace(" <"," <") .replace(" >"," >")
|
||||
}
|
||||
fcn toXML(as,bs){
|
||||
xml:=Sink("<CharacterRemarks>\n");
|
||||
as.zipWith('wrap(a,b){
|
||||
xml.write(" <Character name=\"",xmlEscape(a),"\">",
|
||||
xmlEscape(b),"</Character>\n");
|
||||
},bs);
|
||||
xml.write("</CharacterRemarks>\n").close();
|
||||
}
|
||||
|
||||
toXML(T("April", "Tam O'Shanter", "Emily"),
|
||||
T("Bubbly: I'm > Tam and <= Emily",
|
||||
0'|Burns: "When chapman billies leave the street ..."|,
|
||||
"Short & shrift"))
|
||||
.print();
|
||||
Loading…
Add table
Add a link
Reference in a new issue