For my purposes, I need to search for a specific node in an xml file and, if found, delete it. Should I pull search functionality out into its own method and delete functionality out into its own method? It seems more expensive to do it this way because I'll be searching the xml file once to see if it exists and searching it again to delete it. If I combine these two functionalities into a single method I can delete it right when I find it. Am I understanding SRP correctly here?
Your average XML Parser will create Nodes which know their Parents so you can do something like:
XmlNode node = this.FindNode(filter);
node.ParentNode.DeleteChild(node);
This way you have split both functions but no overhead.
Regarding the core of your Question: Yes, searching and deleting in one Method violates the single responsibility but performance and SRP don't mix that well in many cases so you have to decide whats more important.
PS:
Example is not (knowingly) related to any real language out there.
Do you have any other reasons/situations in which you are searching the xml file? In general it is a Good Thing to separate distinct jobs at any level, regardless of adhering to or violating someone's rule (that's my rule ;-) ). Separating these functions might (?) also make your code more understandable, which may turn out to be more important than a trivial gain in performance.