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

Function xmlNewInputMemory

ThirdParty/libxml2/vtklibxml2/parserInternals.c:1645–1661  ·  view source on GitHub ↗

* xmlNewInputMemory: * @ctxt: parser context * @url: base URL (optional) * @mem: pointer to char array * @size: size of array * @encoding: character encoding (optional) * @flags: optimization hints * * Creates a new parser input to read from a memory area. * * @url is used as base to resolve external entities and for * error reporting. * * If the XML_INPUT_BUF_STATIC flag is set

Source from the content-addressed store, hash-verified

1643 * Returns a new parser input.
1644 */
1645xmlParserInputPtr
1646xmlNewInputMemory(xmlParserCtxtPtr ctxt, const char *url,
1647 const void *mem, size_t size,
1648 const char *encoding, int flags) {
1649 xmlParserInputBufferPtr buf;
1650
1651 if ((ctxt == NULL) || (mem == NULL))
1652 return(NULL);
1653
1654 buf = xmlNewInputBufferMemory(mem, size, flags, XML_CHAR_ENCODING_NONE);
1655 if (buf == NULL) {
1656 xmlCtxtErrMemory(ctxt);
1657 return(NULL);
1658 }
1659
1660 return(xmlNewInputInternal(ctxt, buf, url, encoding));
1661}
1662
1663/**
1664 * xmlNewInputString:

Callers 7

htmlReadMemoryFunction · 0.85
htmlCtxtReadMemoryFunction · 0.85
xmlReadMemoryFunction · 0.85
xmlCtxtReadMemoryFunction · 0.85

Calls 3

xmlNewInputBufferMemoryFunction · 0.85
xmlCtxtErrMemoryFunction · 0.85
xmlNewInputInternalFunction · 0.85

Tested by

no test coverage detected