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

Function htmlCtxtReadMemory

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6620–6636  ·  view source on GitHub ↗

* htmlCtxtReadMemory: * @ctxt: an HTML parser context * @buffer: a pointer to a char array * @size: the size of the array * @URL: only used for error reporting (optional) * @encoding: the document encoding (optinal) * @options: a combination of htmlParserOptions * * Parse an HTML in-memory document and build a tree. The input buffer must * not contain any terminating null bytes. *

Source from the content-addressed store, hash-verified

6618 * Returns the resulting document tree
6619 */
6620htmlDocPtr
6621htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size,
6622 const char *URL, const char *encoding, int options)
6623{
6624 xmlParserInputPtr input;
6625
6626 if ((ctxt == NULL) || (size < 0))
6627 return (NULL);
6628
6629 htmlCtxtReset(ctxt);
6630 htmlCtxtUseOptions(ctxt, options);
6631
6632 input = xmlNewInputMemory(ctxt, URL, buffer, size, encoding,
6633 XML_INPUT_BUF_STATIC);
6634
6635 return(htmlCtxtParseDocument(ctxt, input));
6636}
6637
6638/**
6639 * htmlCtxtReadFd:

Callers

nothing calls this directly

Calls 4

htmlCtxtResetFunction · 0.85
htmlCtxtUseOptionsFunction · 0.85
xmlNewInputMemoryFunction · 0.85
htmlCtxtParseDocumentFunction · 0.85

Tested by

no test coverage detected