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

Function xmlCtxtReadMemory

ThirdParty/libxml2/vtklibxml2/parser.c:14101–14117  ·  view source on GitHub ↗

* xmlCtxtReadMemory: * @ctxt: an XML parser context * @buffer: a pointer to a char array * @size: the size of the array * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML in-memory document and build a tree. The input buffer must * not contain a terminating null byte. * * @URL is used as base to r

Source from the content-addressed store, hash-verified

14099 * Returns the resulting document tree
14100 */
14101xmlDocPtr
14102xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size,
14103 const char *URL, const char *encoding, int options)
14104{
14105 xmlParserInputPtr input;
14106
14107 if ((ctxt == NULL) || (size < 0))
14108 return(NULL);
14109
14110 xmlCtxtReset(ctxt);
14111 xmlCtxtUseOptions(ctxt, options);
14112
14113 input = xmlNewInputMemory(ctxt, URL, buffer, size, encoding,
14114 XML_INPUT_BUF_STATIC);
14115
14116 return(xmlCtxtParseDocument(ctxt, input));
14117}
14118
14119/**
14120 * xmlCtxtReadFd:

Callers 3

parseFileFunction · 0.85
xmlSchemaAddSchemaDocFunction · 0.85
xmlRelaxReadMemoryFunction · 0.85

Calls 4

xmlCtxtResetFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputMemoryFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85

Tested by

no test coverage detected