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

Function xmlCreateDocParserCtxt

ThirdParty/libxml2/vtklibxml2/parser.c:13231–13248  ·  view source on GitHub ↗

* xmlCreateDocParserCtxt: * @str: a pointer to an array of xmlChar * * Creates a parser context for an XML in-memory document. * * Returns the new parser context or NULL */

Source from the content-addressed store, hash-verified

13229 * Returns the new parser context or NULL
13230 */
13231xmlParserCtxtPtr
13232xmlCreateDocParserCtxt(const xmlChar *str) {
13233 xmlParserCtxtPtr ctxt;
13234 xmlParserInputPtr input;
13235
13236 ctxt = xmlNewParserCtxt();
13237 if (ctxt == NULL)
13238 return(NULL);
13239
13240 input = xmlNewInputString(ctxt, NULL, (const char *) str, NULL, 0);
13241 if (input == NULL) {
13242 xmlFreeParserCtxt(ctxt);
13243 return(NULL);
13244 }
13245 inputPush(ctxt, input);
13246
13247 return(ctxt);
13248}
13249
13250#ifdef LIBXML_SAX1_ENABLED
13251/**

Callers 1

xmlSAXParseDocFunction · 0.85

Calls 4

xmlNewParserCtxtFunction · 0.85
xmlNewInputStringFunction · 0.85
xmlFreeParserCtxtFunction · 0.85
inputPushFunction · 0.85

Tested by

no test coverage detected