[Expat-discuss] not well-formed (invalid token) at line 1
zhang yikai
yikaikai at gmail.com
Wed May 5 10:25:32 CEST 2010
Thank you for your hint, I change it to
if (XML_Parse(parser, buf, strlen(buf), XML_TRUE) == XML_STATUS_ERROR) {
printf("Error: %s\n",
XML_ErrorString(XML_GetErrorCode(parser)));
}
XML_ParserFree(parser);
now it fine.
2010/5/5 Jeremy H. Griffith <jeremy at omsys.com>:
> On Wed, 5 May 2010 11:55:59 +0800, zhang yikai
> <yikaikai at gmail.com> wrote:
>
>>what wrong with my code?
>
> Easy. You've provided no way to exit the do/while
> loop without an error. So when expat is done, it
> tries again and fails.
>
> HTH!
>
> -- Jeremy H. Griffith, at Omni Systems Inc.
> <jeremy at omsys.com> http://www.omsys.com/
>
More information about the Expat-discuss
mailing list