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

Function xmlCtxtReadDoc

ThirdParty/libxml2/vtklibxml2/parser.c:14035–14051  ·  view source on GitHub ↗

* xmlCtxtReadDoc: * @ctxt: an XML parser context * @str: a pointer to a zero terminated string * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML in-memory document and build a tree. * * @URL is used as base to resolve external entities and for error * reporting. * * See xmlCtxtUseOptions for deta

Source from the content-addressed store, hash-verified

14033 * Returns the resulting document tree
14034 */
14035xmlDocPtr
14036xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar *str,
14037 const char *URL, const char *encoding, int options)
14038{
14039 xmlParserInputPtr input;
14040
14041 if (ctxt == NULL)
14042 return(NULL);
14043
14044 xmlCtxtReset(ctxt);
14045 xmlCtxtUseOptions(ctxt, options);
14046
14047 input = xmlNewInputString(ctxt, URL, (const char *) str, encoding,
14048 XML_INPUT_BUF_STATIC);
14049
14050 return(xmlCtxtParseDocument(ctxt, input));
14051}
14052
14053/**
14054 * xmlCtxtReadFile:

Callers

nothing calls this directly

Calls 4

xmlCtxtResetFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputStringFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85

Tested by

no test coverage detected