MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlTextReaderIsValid

Function xmlTextReaderIsValid

ThirdParty/libxml2/vtklibxml2/xmlreader.c:4802–4816  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

4800 * Returns the flag value 1 if valid, 0 if no, and -1 in case of error
4801 */
4802int
4803xmlTextReaderIsValid(xmlTextReaderPtr reader)
4804{
4805 if (reader == NULL)
4806 return (-1);
4807#ifdef LIBXML_SCHEMAS_ENABLED
4808 if (reader->validate == XML_TEXTREADER_VALIDATE_RNG)
4809 return (reader->rngValidErrors == 0);
4810 if (reader->validate == XML_TEXTREADER_VALIDATE_XSD)
4811 return (reader->xsdValidErrors == 0);
4812#endif
4813 if ((reader->ctxt != NULL) && (reader->ctxt->validate == 1))
4814 return (reader->ctxt->valid);
4815 return (0);
4816}
4817
4818/**
4819 * xmlTextReaderGetErrorHandler:

Callers 2

streamFileFunction · 0.85
streamProcessTestFunction · 0.85

Calls

no outgoing calls

Tested by 1

streamProcessTestFunction · 0.68