[Expat-discuss] Heh guys and gals ...

Madden, Paul Paul.Madden at six-group.com
Thu Mar 4 13:13:26 CET 2010


I am processing an XHTML document with expat. All goes fine til I hit an " " entity. The expat terminates the parse with error "undefined entity".

Code starts something like :

    parser = XML_ParserCreate ((const XML_Char *) "UTF-8");

    XML_SetElementHandler (parser, FFP_NewsStartElementHandler, FFP_NewsEndElementHandler);

    XML_SetCharacterDataHandler (parser, FFP_NewsCharacterDataHandler);

    XML_SetDefaultHandler (parser, FFP_DefaultHandler);

I was hoping XML_SetDefaultHandler would (somehow) trap this unhandled token but alas it never enters there (for ¬nbsp) before XML_Parse terminates. If I can handle nbsp I can handle any other non standard XML entities.

Anyone help with this one. If so, beer or similar would gladly be bought if and whenever the fixer happens to come to Zürich.

Thanks everyone (ever the optimist).

Paul




The content of this e-mail is intended only for the confidential use of the person addressed. 
If you are not the intended recipient, please notify the sender and delete this e-mail immediately.
Thank you.


More information about the Expat-discuss mailing list