mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +03:00
make sure xmllint --stream and xmllint --stream --valid returns errors
* xmllint.c xmlreader.c include/libxml/xmlreader.h: make sure xmllint --stream and xmllint --stream --valid returns errors code appropriately Daniel
This commit is contained in:
14
xmlreader.c
14
xmlreader.c
@ -2611,6 +2611,20 @@ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlTextReaderIsValid:
|
||||
* @reader: the xmlTextReaderPtr used
|
||||
*
|
||||
* Retrieve the validity status from the parser context
|
||||
*
|
||||
* Returns the flag value 1 if valid, 0 if no, and -1 in case of error
|
||||
*/
|
||||
int
|
||||
xmlTextReaderIsValid(xmlTextReaderPtr reader) {
|
||||
if ((reader == NULL) || (reader->ctxt == NULL)) return(-1);
|
||||
return(reader->ctxt->valid);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlTextReaderGetErrorHandler:
|
||||
* @reader: the xmlTextReaderPtr used
|
||||
|
Reference in New Issue
Block a user