For each product I have to delete the element define with attribute name as LogRootPath, LogGroupPath and LogPath, and it has to be replaced by some other element like, <define name="Path1" value="/root/log">, etc.
I would use XSLT for that. Start with the identity transformation (which copies the whole document unchanged) and add some templates to replace the elements you want to replace.
Joined: Feb 27, 2009
It is sort of a requirement for me to use java to do it, and I have reached a place where I am able to change the values and delete the unwanted tag, but it is not saving it back to the xml file. Please help me how to save the xml file.