converting xml string to string buffer for heap space issues