-//------------------------------------------------------------------------------
-//----------------------------------------------------------- Message::loadXML()
-//------------------------------------------------------------------------------
-void Message::loadXML(const std::string & xmlPathFile) throw(anna::RuntimeException) {
- LOGDEBUG(
- std::string trace = "Loading diameter message from file '";
- trace += xmlPathFile;
- trace += "'";
- anna::Logger::debug(trace, ANNA_FILE_LOCATION);
- );
- anna::xml::DocumentFile xmlDocument; // has private copy constructor defined but not implemented to avoid inhenrit/copy (is very heavy)
- const anna::xml::Node *rootNode;
- xmlDocument.initialize(xmlPathFile.c_str()); // fail here is i/o error
- rootNode = xmlDocument.parse(getEngine()->getDTD()); // Parsing: fail here if xml violates dtd
- LOGDEBUG(
- std::string trace = "Loaded XML file (";
- trace += xmlPathFile;
- trace += "):\n";
- trace += anna::xml::Compiler().apply(rootNode);
- anna::Logger::debug(trace, ANNA_FILE_LOCATION);
- );
- fromXML(rootNode);
-}
-
-