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

Function htmlReadFd

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6483–6502  ·  view source on GitHub ↗

* htmlReadFd: * @fd: an open file descriptor * @url: only used for error reporting (optional) * @encoding: the document encoding, or NULL * @options: a combination of htmlParserOptions * * Convenience function to parse an HTML document from a * file descriptor. * * NOTE that the file descriptor will not be closed when the * context is freed or reset. * * See htmlCtxtReadFd for deta

Source from the content-addressed store, hash-verified

6481 * Returns the resulting document tree
6482 */
6483htmlDocPtr
6484htmlReadFd(int fd, const char *url, const char *encoding, int options)
6485{
6486 htmlParserCtxtPtr ctxt;
6487 xmlParserInputPtr input;
6488 htmlDocPtr doc;
6489
6490 ctxt = htmlNewParserCtxt();
6491 if (ctxt == NULL)
6492 return(NULL);
6493
6494 htmlCtxtUseOptions(ctxt, options);
6495
6496 input = xmlNewInputFd(ctxt, url, fd, encoding, 0);
6497
6498 doc = htmlCtxtParseDocument(ctxt, input);
6499
6500 htmlFreeParserCtxt(ctxt);
6501 return(doc);
6502}
6503
6504/**
6505 * htmlReadIO:

Callers 1

parseFileFunction · 0.85

Calls 5

htmlNewParserCtxtFunction · 0.85
htmlCtxtUseOptionsFunction · 0.85
xmlNewInputFdFunction · 0.85
htmlCtxtParseDocumentFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected