Jump to content

XML/Output: Difference between revisions

m (→‎{{header|Go}}: library path updates)
Line 849:
This produces:
<lang xml><?xml version="1.0" encoding="UTF-8"?><CharacterRemarks><Character name="April">Bubbly: I'm &gt; Tam and &lt;= Emily</Character><Character name="Tam O'Shanter">Burns: "When chapman billies leave the street ..."</Character><Character name="Emily">Short &amp; shrift</Character></CharacterRemarks></lang>
 
=={{header|Mathematica}}==
Some tricky input with the second remark
<lang Mathematica>c = {"April", "Tam O'Shanter","Emily"};
r = {"Bubbly:I'm > Tam and <= Emily" ,
StringReplace["Burns:\"When chapman billies leave the street ...\"", "\"" -> ""], "Short & shrift"};
 
ExportString[ XMLElement[ "CharacterRemarks", {},
{XMLElement["Character", {"name" -> c[[1]]}, {r[[1]]}],
XMLElement["Character", {"name" -> c[[2]]}, {r[[2]]}],
XMLElement["Character", {"name" -> c[[3]]}, {r[[3]]}]
}], "XML", "AttributeQuoting" -> "\""]</lang>
 
<pre><CharacterRemarks>
<Character name=\"April\">Bubbly:I'm &gt; Tam and &lt;= Emily</Character>
<Character name=\"Tam O'Shanter\">Burns:When chapman billies leave the street ...</Character>
<Character name=\"Emily\">Short &amp; shrift</Character>
</CharacterRemarks></pre>
 
 
=={{header|NetRexx}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.