def xml_escape(txt):
    """
	This escaping is ONLY for writing to XML. When writing to HTML, different
	escaping is used.
	
	NOTES: 
		- ElementTree will unescape these automatically when parsing XML
		- Always use double quotes (") for attributes since that is what is escaped here. 
	"""
    return txt.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;'
        ).replace('"', '&quot;')
