Hello,
I have this problem with xmlParseMemory.
with this code it works fine.
#include <stdlib.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
int main() {
char buf[]= "<?xml
version='1.0'?><user><name>man</name></user>";;
xmlDocPtr doc;
xmlKeepBlanksDefault(0);
doc=xmlParseMemory(buf,sizeof(buf));
if (doc == NULL) {
fprintf(stderr, "Document XML invalide\n");
}
}
but when I try to create a function which take char* buffer like argument xmlParseMemory return NULL and I have this error
Entity:
line 1: parser error : ParsePI: PI xm space expected
<?xm
^