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

Function xmlParseCtxtExternalEntity

ThirdParty/libxml2/vtklibxml2/parser.c:12258–12284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12256 */
12257
12258int
12259xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctxt, const xmlChar *URL,
12260 const xmlChar *ID, xmlNodePtr *listOut) {
12261 xmlParserInputPtr input;
12262 xmlNodePtr list;
12263
12264 if (listOut != NULL)
12265 *listOut = NULL;
12266
12267 if (ctxt == NULL)
12268 return(XML_ERR_ARGUMENT);
12269
12270 input = xmlLoadExternalEntity((char *)URL, (char *)ID, ctxt);
12271 if (input == NULL)
12272 return(ctxt->errNo);
12273
12274 xmlCtxtInitializeLate(ctxt);
12275
12276 list = xmlCtxtParseContent(ctxt, input, /* hasTextDecl */ 1, 1);
12277 if (listOut != NULL)
12278 *listOut = list;
12279 else
12280 xmlFreeNodeList(list);
12281
12282 xmlFreeInputStream(input);
12283 return(ctxt->errNo);
12284}
12285
12286#ifdef LIBXML_SAX1_ENABLED
12287/**

Callers 1

xmlParseExternalEntityFunction · 0.85

Calls 5

xmlLoadExternalEntityFunction · 0.85
xmlCtxtInitializeLateFunction · 0.85
xmlCtxtParseContentFunction · 0.85
xmlFreeNodeListFunction · 0.85
xmlFreeInputStreamFunction · 0.85

Tested by

no test coverage detected