Added a method to escape characters with syntactic meaning in XML/HTML as charcter entity references.