I am wondering if I declare a array of chars like this.
I am clearing the array before I fill it by using one of the following. By setting the first char to zero:
static char xml_buffer;
or is this preferred?
However, the problem is when I fill the buffer I don't think the null is being inserted at the end of the string.
memset(xml_buffer, 0, sizeof(xml_buffer));
I am using a xml parser that will fill the buffer.
I don't think the null is being automatically appended and the documentation doesn't specify either? Could be I am not clearing the buffer, or is there any way to do this manually?
success = xmlFillString(tree, xml_buffer, sizeof(xml_buffer), XML_NO_CALLBACK);