You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Frederik De Backer <Fr...@rug.ac.be> on 2001/02/19 17:23:38 UTC

validating from memorybuffers

Hello,

I've got a little problem to validate an xml file from a memory buffer.
The dtd file is in a memory buffer and a reference is obtained by
overriding the entityResolve function from EntityHandler. 
The overridden class EntityHandler has a private member which contains the
DTDString. This string is set as follows:

 my_DTDString = (char *) malloc(sizeof(const char*) * (strlen(DTDString)+1)  );
 my_DTDString = strcpy(my_DTDString, DTDString);   
 my_DTDString[strlen(my_DTDString)] = '\0';

When I parse the xml document, the parser gives the following:

Fatal Error at file "agentExecutionInfo.dtd", line 26, column 1
   Message: Invalid character (Unicode: 0x0) 

Line 26 is the end of the dtd file.

Could anyone help me out with this problem?

Thank you very much,

Frederik De Backer
student University of Ghent