APG
… an ABNF Parser Generator
|
This library contains an API for creating, using and destroying a standards-compliant, non-validating XML parser. This serves both as an example of a relatively complex APG-generated parser and as a practical, useful, non-validating XML parser. It will parse both the XML declaration and the Document Type Declaration (DTD) if present. As a non-validating XML parser it will:
This is an event-based parser as opposed to a Document Object Model (DOM) type parser. It provides an API that exposes parsed information at well-defined document events. The document events are handled through user-written callback functions. Be aware that data presented to the callback function is transient. It is valid only for the duration of the call. The application will need to make copies into it's own memory space of any data that needs to be retained for later use. Events may be ignored simply by not providing a callback function for the event. The document events are: