I am new to tinyXml2. I am trying to parse an xml
file and print the text in the root tag. this is my code.
#include<stdio.h>
#include "tinyxml2.h"
using namespace std;
int main()
{
XMLDocument doc;
doc.LoadFile("input.xml");
const char *title = doc.FirstChildElement("root")->GetText();
printf("%s\n", title);
return 0;
}
On building this I get an error saying XMLDocument was not declared in this scope
.
What is the problem?