removed multiple edits of $replace to String

created XMLUtils shared helper so that replacement of value to be entered into XML is not done separately