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

Function xmlSetupParserForBuffer

ThirdParty/libxml2/vtklibxml2/parser.c:12958–12973  ·  view source on GitHub ↗

* xmlSetupParserForBuffer: * @ctxt: an XML parser context * @buffer: a xmlChar * buffer * @filename: a file name * * DEPRECATED: Don't use. * * Setup the parser context to parse a new buffer; Clears any prior * contents from the parser context. The buffer parameter must not be * NULL, but the filename parameter can be */

Source from the content-addressed store, hash-verified

12956 * NULL, but the filename parameter can be
12957 */
12958void
12959xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
12960 const char* filename)
12961{
12962 xmlParserInputPtr input;
12963
12964 if ((ctxt == NULL) || (buffer == NULL))
12965 return;
12966
12967 xmlClearParserCtxt(ctxt);
12968
12969 input = xmlNewInputString(ctxt, filename, (const char *) buffer, NULL, 0);
12970 if (input == NULL)
12971 return;
12972 inputPush(ctxt, input);
12973}
12974
12975/**
12976 * xmlSAXUserParseFile:

Callers

nothing calls this directly

Calls 3

xmlClearParserCtxtFunction · 0.85
xmlNewInputStringFunction · 0.85
inputPushFunction · 0.85

Tested by

no test coverage detected