#include <xml_message_parser.h>
Inherits fipa::acl::MessageParserImplementation.
Definition at line 10 of file xml_message_parser.h.
| bool fipa::acl::XMLMessageParser::parseData |
( |
const std::string & |
storage, |
|
|
ACLMessage & |
msg |
|
) |
| |
|
virtual |
Reimplemented from fipa::acl::MessageParserImplementation.
Definition at line 11 of file xml_message_parser.cpp.
16 const char* parseResult = doc.Parse(storage.c_str());
18 if(parseResult != NULL)
21 LOG_WARN_S <<
"Parsing message XML failed for: " << parseResult;
25 const TiXmlElement* messageElem = doc.FirstChildElement();
27 if(messageElem->ValueStr() !=
"fipa-message")
29 LOG_WARN_S <<
"Parsing error: XML main node not named 'fipa-message' but " << messageElem->ValueStr();
36 msg.setPerformative(messageElem->Attribute(
"act"));
38 catch(
const std::exception& e)
41 LOG_WARN_S <<
"Parsing error performative: " << e.what();
46 const std::string* convID = messageElem->Attribute(std::string(
"conversation-id"));
49 msg.setConversationID(*convID);
53 const TiXmlElement * pChild;
54 for ( pChild = messageElem->FirstChildElement(); pChild != 0; pChild = pChild->NextSiblingElement())
56 if(!parseParameter(msg, pChild))
The documentation for this class was generated from the following files: