public static String insertXML(String xml,String insertXML,String marker,boolean afterMarker){
  int idx=xml.indexOf(marker);
  if (idx != -1) {
    int start=(afterMarker) ? idx + marker.length() : idx;
    xml=xml.substring(0,start) + insertXML + xml.substring(start);
  }
  return xml;
}

public static String insertXML ( String xml , String insertXML , String marker , boolean afterMarker ) { int idx = xml . indexOf ( marker ) ; if ( idx != - 1 ) { int start = ( afterMarker ) ? idx + marker . length ( ) : idx ; xml = xml . substring ( 0 , start ) + insertXML + xml . substring ( start ) ; } return xml ; }
inserts xml to a property xml .
