Fixes #707, this strips whitespace off before trying to parse the returned xml