public static String replaceElementText(String xmlFile,String tagName,String value,boolean all,boolean overwrite) throws DOMException {
  Map elements=new HashMap();
  elements.put(tagName,value);
  return replaceElementText(xmlFile,elements,all,overwrite);
}

public static String replaceElementText ( String xmlFile , String tagName , String value , boolean all , boolean overwrite ) throws DOMException { Map elements = new HashMap ( ) ; elements . put ( tagName , value ) ; return replaceElementText ( xmlFile , elements , all , overwrite ) ; }
replaces elements subtree with the text value in the xml document < br > < p / > important ! ! this method removes entire subtree of the element and puts the text as a child node . < p / > use this method when only one element tag needs to be changed in the xml file .
