43#include "rxp/XML_Parser.h"
46# define __STRINGIZE(X) #X
47# define DATA __STRINGIZE(DATAC)
107 const char *instruction);
116 My_Parser_Class pclass;
144 Parse_State *state = (Parse_State *)data;
148 printf(
"%*s document %d\n", state->depth*4,
">", state->depth);
156 Parse_State *state = (Parse_State *)data;
158 printf(
"%*s <document %d\n", state->depth*4,
">", state->depth);
168 (void)c; (void)p; (void)attributes;
169 Parse_State *state = (Parse_State *)data;
173 printf(
"%*s %s %d\n", state->depth*4,
">", name, state->depth);
183 (void)c; (void)p; (void)attributes;
184 Parse_State *state = (Parse_State *)data;
186 printf(
"%*s %s %d\n", state->depth*4,
":", name, state->depth);
196 Parse_State *state = (Parse_State *)data;
198 printf(
"%*s %s %d\n", state->depth*4,
"<", name, state->depth);
209 Parse_State *state = (Parse_State *)data;
211 printf(
"%*s [pcdata[%s]] %d\n", state->depth*4,
"", chars, state->depth);
221 Parse_State *state = (Parse_State *)data;
223 printf(
"%*s [cdata[%s]] %d\n", state->depth*4,
"", chars, state->depth);
230 const char *instruction)
233 Parse_State *state = (Parse_State *)data;
235 printf(
"%*s [proc[%s]] %d\n", state->depth*4,
"", instruction, state->depth);
244 Parse_State *state = (Parse_State *)data;
246 printf(
"%*s [error[%s]] %d\n", state->depth*4,
"",
get_error(p), state->depth);
const char * get_error(XML_Parser &p)
Get the error message for the last error.
XML_Parser * make_parser(InputSource source, void *data)
Create a parser for the RXP InputSource.
void register_id(EST_Regex id_pattern, EST_String directory)