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

Function xmlRelaxReadMemory

ThirdParty/libxml2/vtklibxml2/relaxng.c:1432–1448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430}
1431
1432static xmlDoc *
1433xmlRelaxReadMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *buf, int size) {
1434 xmlParserCtxtPtr pctxt;
1435 xmlDocPtr doc;
1436
1437 pctxt = xmlNewParserCtxt();
1438 if (pctxt == NULL) {
1439 xmlRngPErrMemory(ctxt);
1440 return(NULL);
1441 }
1442 if (ctxt->serror != NULL)
1443 xmlCtxtSetErrorHandler(pctxt, ctxt->serror, ctxt->userData);
1444 doc = xmlCtxtReadMemory(pctxt, buf, size, NULL, NULL, 0);
1445 xmlFreeParserCtxt(pctxt);
1446
1447 return(doc);
1448}
1449
1450/**
1451 * xmlRelaxNGIncludePush:

Callers 1

xmlRelaxNGParseFunction · 0.85

Calls 5

xmlNewParserCtxtFunction · 0.85
xmlRngPErrMemoryFunction · 0.85
xmlCtxtSetErrorHandlerFunction · 0.85
xmlCtxtReadMemoryFunction · 0.85
xmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected