2 //metadoc copyright Steve Dekorte 2002
4 //metadoc license BSD revised
7 #ifndef IOSGMLPARSER_DEFINED
8 #define IOSGMLPARSER_DEFINED 1
11 #include <sgml/libsgml.h>
13 typedef IoObject IoSGMLParser
;
19 SGML_HANDLERS handlers
;
22 IoMessage
*startElementMessage
;
23 IoMessage
*endElementMessage
;
24 IoMessage
*newAttributeMessage
;
25 IoMessage
*newTextMessage
;
29 IoSGMLParser
*IoSGMLParser_proto(void *state
);
30 void IoSGMLParser_free(IoSGMLParser
*self
);
31 IoSGMLParser
*IoSGMLParser_rawClone(IoSGMLParser
*self
);
32 void IoSGMLParser_mark(IoSGMLParser
*self
);
33 void IoSGMLParser_free(IoSGMLParser
*self
);
35 /* --- callbacks ---------------------------------- */
37 void IoSGMLParser_startElementHandler(SGML_PARSER
*parser
,
39 const char *elementName
);
41 void IoSGMLParser_endElementHandler(SGML_PARSER
*parser
,
43 const char *elementName
);
45 void IoSGMLParser_newAttributeHandler(SGML_PARSER
*parser
,
47 const char *attributeName
,
48 const char *attributeValue
);
50 void IoSGMLParser_characterDataHandler(SGML_PARSER
*parser
,
54 /* ------------------------------------------------ */
56 IoObject
*IoSGMLParser_parse(IoObject
*self
, IoObject
*locals
, IoMessage
*m
);