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

Function xmlReadDoc

ThirdParty/libxml2/vtklibxml2/parser.c:13838–13859  ·  view source on GitHub ↗

* xmlReadDoc: * @cur: a pointer to a zero terminated string * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Convenience function to parse an XML document from a * zero-terminated string. * * See xmlCtxtReadDoc for details. * * Returns the resulting document tree */

Source from the content-addressed store, hash-verified

13836 * Returns the resulting document tree
13837 */
13838xmlDocPtr
13839xmlReadDoc(const xmlChar *cur, const char *URL, const char *encoding,
13840 int options)
13841{
13842 xmlParserCtxtPtr ctxt;
13843 xmlParserInputPtr input;
13844 xmlDocPtr doc;
13845
13846 ctxt = xmlNewParserCtxt();
13847 if (ctxt == NULL)
13848 return(NULL);
13849
13850 xmlCtxtUseOptions(ctxt, options);
13851
13852 input = xmlNewInputString(ctxt, URL, (const char *) cur, encoding,
13853 XML_INPUT_BUF_STATIC);
13854
13855 doc = xmlCtxtParseDocument(ctxt, input);
13856
13857 xmlFreeParserCtxt(ctxt);
13858 return(doc);
13859}
13860
13861/**
13862 * xmlReadFile:

Callers

nothing calls this directly

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputStringFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85
xmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected