how to comment out or remove the characters (<!-- -->) in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file

how to comment out or remove the characters () in the tomcat web.xml file using ansible and also a simple playbbok to add the tomcat filters to web.xml file.please help me

You could use a regex to strip comments, but that's going to be fragile at best.
Might be better off by processing it with a real XML parser.
Take a look at the new xml module:
http://docs.ansible.com/ansible/latest/xml_module.html
You might be able to use that to add your tomcat filters.

Dick