XML utilities: parsers and escaping functions