1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

applied a patch from Stphane Bidoul to allow per XMLtextReader error and

* xmlreader.c include/libxml/xmlreader.h python/generator.py
  python/libxml.c python/libxml.py win32/libxml2.def.src: applied
  a patch from Stphane Bidoul to allow per XMLtextReader error
  and warning handling
* python/tests/Makefile.am python/tests/readererr.py: adding the
  specific regression test
Daniel
This commit is contained in:
Daniel Veillard
2003-01-16 22:45:08 +00:00
parent 71f9d7310c
commit 26f70269c8
9 changed files with 390 additions and 3 deletions

View File

@@ -23,6 +23,13 @@ typedef enum {
XML_PARSER_SUBST_ENTITIES = 4
} xmlParserProperties;
typedef enum {
XMLREADER_SEVERITY_VALIDITY_WARNING = 1,
XMLREADER_SEVERITY_VALIDITY_ERROR = 2,
XMLREADER_SEVERITY_WARNING = 3,
XMLREADER_SEVERITY_ERROR = 4
} xmlReaderSeverities;
typedef struct _xmlTextReader xmlTextReader;
typedef xmlTextReader *xmlTextReaderPtr;
@@ -99,6 +106,23 @@ int xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
int prop);
xmlNodePtr xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
xmlDocPtr xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
/*
* Error handling extensions
*/
typedef void (*xmlTextReaderErrorFunc) (void *arg,
const char *msg,
int line,
int col,
const char *URI,
xmlReaderSeverities severity);
void xmlTextReaderSetErrorHandler (xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void *arg);
void xmlTextReaderGetErrorHandler (xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg);
#ifdef __cplusplus
}
#endif