Java: modify XML file (extended)

I needed a method to modify xml file, preserving the structure and replacing only certain attributes and nodes content.
Also, I needed a possibility to add dynamically inner xml content.
Here is a pretty wonderful solution for simple xml data updating How To Modify XML File In Java – (DOM Parser).
I added a mechanism to determine dynamically added xml data.

And here is the modified class for modification of this xml file: