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

Function xmlCreateURLParserCtxt

ThirdParty/libxml2/vtklibxml2/parser.c:12774–12795  ·  view source on GitHub ↗

* xmlCreateURLParserCtxt: * @filename: the filename or URL * @options: a combination of xmlParserOption * * DEPRECATED: Use xmlNewParserCtxt and xmlCtxtReadFile. * * Create a parser context for a file or URL content. * Automatic support for ZLIB/Compress compressed document is provided * by default if found at compile-time and for file accesses * * Returns the new parser context or NUL

Source from the content-addressed store, hash-verified

12772 * Returns the new parser context or NULL
12773 */
12774xmlParserCtxtPtr
12775xmlCreateURLParserCtxt(const char *filename, int options)
12776{
12777 xmlParserCtxtPtr ctxt;
12778 xmlParserInputPtr input;
12779
12780 ctxt = xmlNewParserCtxt();
12781 if (ctxt == NULL)
12782 return(NULL);
12783
12784 xmlCtxtUseOptions(ctxt, options);
12785 ctxt->linenumbers = 1;
12786
12787 input = xmlLoadExternalEntity(filename, NULL, ctxt);
12788 if (input == NULL) {
12789 xmlFreeParserCtxt(ctxt);
12790 return(NULL);
12791 }
12792 inputPush(ctxt, input);
12793
12794 return(ctxt);
12795}
12796
12797/**
12798 * xmlCreateFileParserCtxt:

Callers 2

xmlSchemaValidateFileFunction · 0.85
xmlCreateFileParserCtxtFunction · 0.85

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlLoadExternalEntityFunction · 0.85
xmlFreeParserCtxtFunction · 0.85
inputPushFunction · 0.85

Tested by

no test coverage detected