def _xml_escape(data):
<EOL>from_symbols = '<STR_LIT>'<EOL>to_symbols = ('<STR_LIT:&>'+s+'<STR_LIT:;>' for s in "<STR_LIT>".split())<EOL>for from_,to_ in zip(from_symbols, to_symbols):<EOL><INDENT>data = data.replace(from_, to_)<EOL><DEDENT>return data<EOL>
Escape &, <, >, ", ', etc. in a string of data.