Re: not well-formed (invalid token) at line 1

zhang yikai <[email protected]> Wed, 5 May 2010 16:25:32 +0800
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
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 <[email protected]>:
> On Wed, 5 May 2010 11:55:59 +0800, zhang yikai
> <[email protected]> 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.
>  <[email protected]>  http://www.omsys.com/
>