It sounds like you want to remove a payload from a payloadXML file. Is that correct?
It is possible to do that using File.Read, Results.RegexReplace and File.Write.
But I'm not sure this is the best way to do it.
How many payloads are in the payloadXML file?
What is the purpose of this? What are you trying to accomplish?
It might be better to rescan all the files in the folder into a new payloadXML file.