Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

xmlEscapeEntities : char out of range

Hi experts,

I am using libxml2 to generate an XML document containing details read from a database.  The document is correctly created, but I am seeing the above warning message.  Could someone tell me why this is generated.  Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ambuli

ASKER

Thank you?
Does a NULL from database would cause this?
>> Does a NULL from database would cause this?

By NULL do you mean a NULL character ? If so, then that will just be a premature ending of the string.

If you mean NULL as in a NULL pointer :

        char *name = NULL;

then I think that would crash your application (ie. you need to check for NULL).
>> By NULL do you mean a NULL character ? If so, then that will just be a premature ending of the string.

Correction : it depends on how you obtained the length of the string. If you used strlen, then my answer is valid : it will be a premature end if the string.

If however you obtained the length from the database somehow, and there is a NULL character in the middle of the string, then this will indeed cause that error.