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

Function xmlReadIO

ThirdParty/libxml2/vtklibxml2/parser.c:13996–14016  ·  view source on GitHub ↗

* xmlReadIO: * @ioread: an I/O read function * @ioclose: an I/O close function (optional) * @ioctx: an I/O handler * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML document from I/O functions and context and build a tree. * * See xmlCtxtReadIO for details. * * Returns the resulting document tre

Source from the content-addressed store, hash-verified

13994 * Returns the resulting document tree
13995 */
13996xmlDocPtr
13997xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
13998 void *ioctx, const char *URL, const char *encoding, int options)
13999{
14000 xmlParserCtxtPtr ctxt;
14001 xmlParserInputPtr input;
14002 xmlDocPtr doc;
14003
14004 ctxt = xmlNewParserCtxt();
14005 if (ctxt == NULL)
14006 return(NULL);
14007
14008 xmlCtxtUseOptions(ctxt, options);
14009
14010 input = xmlNewInputIO(ctxt, URL, ioread, ioclose, ioctx, encoding, 0);
14011
14012 doc = xmlCtxtParseDocument(ctxt, input);
14013
14014 xmlFreeParserCtxt(ctxt);
14015 return(doc);
14016}
14017
14018/**
14019 * xmlCtxtReadDoc:

Callers

nothing calls this directly

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputIOFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85
xmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected