Added ability to pass in a string containing XML