52 template<
class T >
static bool ReadXMLFile( T &xmlBind,
const char *fname, std::string &errMsg )
57 lmx::c_xml_reader_file xmlReader( fname );
58 if( xmlReader.is_open() )
61 success = ( lmx::ELMX_OK == xmlBind.unmarshal( xmlReader ) );
65 std::string readerError;
66 xmlReader.get_error_message( &readerError );
69 errMsg =
"Error reading file \"";
72 errMsg += readerError +
'\n';
77 errMsg =
"Error opening file \"";
92 template<
class T >
static bool ReadXMLData( T &xmlBind,
const char *data,
unsigned int length,std::string &errMsg )
96 lmx::c_xml_reader_memory xmlReader(data,length);
99 success = ( lmx::ELMX_OK == xmlBind.unmarshal( xmlReader ) );
103 std::string readerError;
104 xmlReader.get_error_message( &readerError );
107 errMsg =
"Error parsing metadata: \n";
108 errMsg += readerError +
'\n';