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

Function xmlReadMemory

ThirdParty/libxml2/vtklibxml2/parser.c:13918–13942  ·  view source on GitHub ↗

* xmlReadMemory: * @buffer: a pointer to a char array * @size: the size of the array * @url: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML in-memory document and build a tree. The input buffer must * not contain a terminating null byte. * * See xmlCtxtReadMemory for details. * * Returns the resulting

Source from the content-addressed store, hash-verified

13916 * Returns the resulting document tree
13917 */
13918xmlDocPtr
13919xmlReadMemory(const char *buffer, int size, const char *url,
13920 const char *encoding, int options)
13921{
13922 xmlParserCtxtPtr ctxt;
13923 xmlParserInputPtr input;
13924 xmlDocPtr doc;
13925
13926 if (size < 0)
13927 return(NULL);
13928
13929 ctxt = xmlNewParserCtxt();
13930 if (ctxt == NULL)
13931 return(NULL);
13932
13933 xmlCtxtUseOptions(ctxt, options);
13934
13935 input = xmlNewInputMemory(ctxt, url, buffer, size, encoding,
13936 XML_INPUT_BUF_STATIC);
13937
13938 doc = xmlCtxtParseDocument(ctxt, input);
13939
13940 xmlFreeParserCtxt(ctxt);
13941 return(doc);
13942}
13943
13944/**
13945 * xmlReadFd:

Callers 6

RequestDataMethod · 0.85
xmlSchematronParseFunction · 0.85
memParseTestFunction · 0.85
xsdTestCaseFunction · 0.85
__ParseMethod · 0.85
InsertFromStringMethod · 0.85

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlCtxtUseOptionsFunction · 0.85
xmlNewInputMemoryFunction · 0.85
xmlCtxtParseDocumentFunction · 0.85
xmlFreeParserCtxtFunction · 0.85

Tested by 1

memParseTestFunction · 0.68