<element1 type="type1" name="value1">
<start play="no"/>
<element2 aaa="AAA"/>
<element2 bbb="BBB"/>
<element3 ccc="CCC">
<element4/><!-- play="no"/>-->
</element3>
</element1>
And I use following code to parse it:
int parse( const char *xml) {
printf("Entered\n");
xmlDoc *doc = NULL;
doc = xmlReadFile(xml, NULL, 0);
if (doc == NULL)
printf("Could not parse file\n");
else {
printf("Success\n");
xmlFreeDoc(doc);
}
xmlCleanupParser();
return 0;
}
But I get following error:
Entered
I/O warning : failed to load external entity "<element1 type="type1" name="value1">
<start play="no"/>
<element2 aaa="AAA"/>
<element2 bbb="BBB"/>
<element3 ccc="CCC">
<element4/><!-- play="no"/>-->
</element3>
</element1>
"
Could not parse file