1
0
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:
Daniel Veillard
2003-04-11 19:38:54 +00:00
parent c6cae7b690
commit f6bad798cf
4 changed files with 30 additions and 0 deletions

View File

@ -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