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

Function xmlReadFd

ThirdParty/libxml2/vtklibxml2/parser.c:13960–13979  ·  view source on GitHub ↗

* xmlReadFd: * @fd: an open file descriptor * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML from a file descriptor and build a tree. * * See xmlCtxtReadFd for details. * * NOTE that the file descriptor will not be closed when the * context is freed or reset. * * Returns the resulting document t

Source from the content-addressed store, hash-verified

13958 * Returns the resulting document tree
13959 */
13960xmlDocPtr
13961xmlReadFd(int fd, const char *URL, const char *encoding, int options)
13962{
13963 xmlParserCtxtPtr ctxt;
13964 xmlParserInputPtr input;
13965 xmlDocPtr doc;
13966
13967 ctxt = xmlNewParserCtxt();
13968 if (ctxt == NULL)
13969 return(NULL);
13970
13971 xmlCtxtUseOptions(ctxt, options);
13972
13973 input = xmlNewInputFd(ctxt, URL, fd, encoding, 0);
13974
13975 doc = xmlCtxtParseDocument(ctxt, input);
13976
13977 xmlFreeParserCtxt(ctxt);
13978 return(doc);
13979}
13980
13981/**
13982 * xmlReadIO:

Callers

nothing calls this directly

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputFdFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85
xmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected