How to add/remove only specific blocks of XML to a new file?

I’m trying to filter an XML such that only specific blocks of XML would be needed I have the original XML like this <PROJECT> <BLOCKLIST> <BLOCK> <TASK> <INSTALL_METHOD installer="TYPE 1" /> <FILE> <INSTALL_OPTIONS option="signature"/> <INSTALL_OPTIONS option="checksum"/> </FILE> </TASK> <TASK> <INSTALL_METHOD installer="TYPE 2" /> <FILE> <INSTALL_OPTIONS option="signature"/> <INSTALL_OPTIONS option="checksum"/> </FILE> </TASK> <TASK> <INSTALL_METHOD installer="TYPE 3" />… Read More How to add/remove only specific blocks of XML to a new file?