I am using TinyXML2 and I got some strange problem. So It seems it work because I dont have any crashes but when I want to output one of the value I got I have nothing , if someone know why ? I already used tinyxml2 and it was working but here maybe the XML is strange?
#include <iostream>
#include "tinyxml2/tinyxml2.cpp"
#include "../Inc/classConfigCtx.h"
#include "../Inc/globalDefine.h"
using namespace tinyxml2;
int main() {
std::cout << "Hello World!";
XMLDocument doc;
doc.LoadFile( "NetworkConfig.xml" );
int AppliMsgPort_;
const char * portAppli;
const char * IPtemp;
XMLElement * pRootElement =doc.RootElement()->FirstChildElement();
portAppli=pRootElement->FirstChildElement()->GetText();
std::cout<<portAppli;
return 0;
}
and my XML
<configuration>
<operational_00001000><name value="100.CBD" /><radio_1><type value="Net" /><ip value="10.36.1.1" /><port_s value="50010" /><port_r value="50100" /><radioID value="10040" /></radio_1></operational_00001000>
<operational_00001005><name value="100.LOG" /><radio_1><type value="Net" /><ip value="10.26.2.1" /><port_s value="50000" /><port_r value="50000" /><radioID value="1000005" /></radio_1></operational_00001005>
</configuration>