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

Function xmlNewInputFd

ThirdParty/libxml2/vtklibxml2/parserInternals.c:1716–1731  ·  view source on GitHub ↗

* xmlNewInputFd: * @ctxt: parser context * @url: base URL (optional) * @fd: file descriptor * @encoding: character encoding (optional) * @flags: unused, pass 0 * * Creates a new parser input to read from a zero-terminated string. * * @url is used as base to resolve external entities and for * error reporting. * * @fd is closed after parsing has finished. * * Returns a new parser

Source from the content-addressed store, hash-verified

1714 * Returns a new parser input.
1715 */
1716xmlParserInputPtr
1717xmlNewInputFd(xmlParserCtxtPtr ctxt, const char *url,
1718 int fd, const char *encoding, int flags ATTRIBUTE_UNUSED) {
1719 xmlParserInputBufferPtr buf;
1720
1721 if ((ctxt == NULL) || (fd < 0))
1722 return(NULL);
1723
1724 buf = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
1725 if (buf == NULL) {
1726 xmlCtxtErrMemory(ctxt);
1727 return(NULL);
1728 }
1729
1730 return(xmlNewInputInternal(ctxt, buf, url, encoding));
1731}
1732
1733/**
1734 * xmlNewInputIO:

Callers 6

htmlReadFdFunction · 0.85
htmlCtxtReadFdFunction · 0.85
xmlSAXParseFileWithDataFunction · 0.85
xmlReadFileFunction · 0.85
xmlReadFdFunction · 0.85
xmlCtxtReadFdFunction · 0.85

Calls 3

xmlCtxtErrMemoryFunction · 0.85
xmlNewInputInternalFunction · 0.85

Tested by

no test coverage detected