Commit 2c5d945b authored by Vitaly Lipatov's avatar Vitaly Lipatov

Configuration: use iterator instead xmlNode

parent 6125521b
...@@ -218,8 +218,8 @@ void Configuration::initConfiguration( int argc, const char* const* argv ) ...@@ -218,8 +218,8 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
{ {
if( oind == NULL ) if( oind == NULL )
{ {
xmlNode* cnode = unixml.findNode(unixml.getFirstNode(),"ObjectsMap"); UniXML_iterator it = unixml.findNode(unixml.getFirstNode(),"ObjectsMap");
if( !cnode ) if( it == NULL )
{ {
unideb[Debug::CRIT] << "(Configuration:init): not found <ObjectsMap> node in " << fileConfName << endl; unideb[Debug::CRIT] << "(Configuration:init): not found <ObjectsMap> node in " << fileConfName << endl;
throw SystemError("(Configuration:init): not found <ObjectsMap> node in " + fileConfName ); throw SystemError("(Configuration:init): not found <ObjectsMap> node in " + fileConfName );
...@@ -227,7 +227,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv ) ...@@ -227,7 +227,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
try try
{ {
if( unixml.getIntProp(cnode,"idfromfile") == 0 ) if( it.getIntProp("idfromfile") == 0 )
oind = new ObjectIndex_XML(unixml); //(fileConfName); oind = new ObjectIndex_XML(unixml); //(fileConfName);
else else
oind = new ObjectIndex_idXML(unixml); //(fileConfName); oind = new ObjectIndex_idXML(unixml); //(fileConfName);
...@@ -242,12 +242,12 @@ void Configuration::initConfiguration( int argc, const char* const* argv ) ...@@ -242,12 +242,12 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
// Init MessageInterface // Init MessageInterface
{ {
xmlNode* cnode = unixml.findNode(unixml.getFirstNode(),"messages"); UniXML_iterator it = unixml.findNode(unixml.getFirstNode(),"messages");
if( cnode == NULL ) if( it == NULL )
mi = new DefaultMessageInterface(); mi = new DefaultMessageInterface();
else else
{ {
if( unixml.getIntProp(cnode,"idfromfile") == 0 ) if( it.getIntProp("idfromfile") == 0 )
mi = new MessageInterface_XML(unixml); // (fileConfName); mi = new MessageInterface_XML(unixml); // (fileConfName);
else else
mi = new MessageInterface_idXML(unixml); // (fileConfName); mi = new MessageInterface_idXML(unixml); // (fileConfName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment