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

Function xmlParseEntityRefInternal

ThirdParty/libxml2/vtklibxml2/parser.c:7684–7706  ·  view source on GitHub ↗

* xmlParseEntityRefInternal: * @ctxt: an XML parser context * @inAttr: whether we are in an attribute value * * Parse an entity reference. Always consumes '&'. * * [68] EntityRef ::= '&' Name ';' * * Returns the name, or NULL in case of error. */

Source from the content-addressed store, hash-verified

7682 * Returns the name, or NULL in case of error.
7683 */
7684static const xmlChar *
7685xmlParseEntityRefInternal(xmlParserCtxtPtr ctxt) {
7686 const xmlChar *name;
7687
7688 GROW;
7689
7690 if (RAW != '&')
7691 return(NULL);
7692 NEXT;
7693 name = xmlParseName(ctxt);
7694 if (name == NULL) {
7695 xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
7696 "xmlParseEntityRef: no name\n");
7697 return(NULL);
7698 }
7699 if (RAW != ';') {
7700 xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
7701 return(NULL);
7702 }
7703 NEXT;
7704
7705 return(name);
7706}
7707
7708/**
7709 * xmlParseEntityRef:

Callers 3

xmlParseAttValueInternalFunction · 0.85
xmlParseReferenceFunction · 0.85
xmlParseEntityRefFunction · 0.85

Calls 2

xmlParseNameFunction · 0.85
xmlFatalErrFunction · 0.85

Tested by

no test coverage detected