c++ style / delay std::string creation in xml loading
fix unsafe return of temporary - closes #2493