MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / htmlReadMemory

Function htmlReadMemory

Externals/LibXML/HTMLparser.c:6040–6053  ·  view source on GitHub ↗

* htmlReadMemory: * @buffer: a pointer to a char array * @size: the size of the array * @URL: the base URL to use for the document * @encoding: the document encoding, or NULL * @options: a combination of htmlParserOption(s) * * parse an XML in-memory document and build a tree. * * Returns the resulting document tree */

Source from the content-addressed store, hash-verified

6038 * Returns the resulting document tree
6039 */
6040htmlDocPtr
6041htmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
6042{
6043 htmlParserCtxtPtr ctxt;
6044
6045 xmlInitParser();
6046 ctxt = xmlCreateMemoryParserCtxt(buffer, size);
6047 if (ctxt == NULL)
6048 return (NULL);
6049 htmlDefaultSAXHandlerInit();
6050 if (ctxt->sax != NULL)
6051 memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
6052 return (htmlDoRead(ctxt, URL, encoding, options, 0));
6053}
6054
6055/**
6056 * htmlReadFd:

Callers 3

parseAndPrintFileFunction · 0.85
gen_htmlDocPtrFunction · 0.85
test_htmlReadMemoryFunction · 0.85

Calls 4

memcpyFunction · 0.85
htmlDoReadFunction · 0.85

Tested by 2

gen_htmlDocPtrFunction · 0.68
test_htmlReadMemoryFunction · 0.68