No, the principle of single responsibility is not about the details of writing code. This is about how to divide the functionality of the program into classes. It says that if a class can change for several reasons, it should be two classes. A classic example is a class that creates and formats a report; The report content and report format are likely to change at different times, so the class is a good candidate for refactoring by two.
You do not say what the functional responsibility of your class is, but, from the point of view of any work that your class should do, searching and deleting an XML node are only parts of this single task and executing them in one class and in one operation does not violate SRP.
(On the other hand, if your class had a lot of domain logic, as well as a lot of nuts and bolts about XML management, that would violate SRP.)
source share