This code should be made part of the setString() method, however, since it is modifying and setting the XML input string.