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

Function getString

ThirdParty/libxml2/vtklibxml2/runsuite.c:257–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257static xmlChar *
258getString(xmlNodePtr cur, const char *xpath) {
259 xmlChar *ret = NULL;
260 xmlXPathObjectPtr res;
261 xmlXPathCompExprPtr comp;
262
263 if ((cur == NULL) || (cur->doc == NULL) || (xpath == NULL))
264 return(NULL);
265 ctxtXPath->doc = cur->doc;
266 ctxtXPath->node = cur;
267 comp = xmlXPathCompile(BAD_CAST xpath);
268 if (comp == NULL) {
269 fprintf(stderr, "Failed to compile %s\n", xpath);
270 return(NULL);
271 }
272 res = xmlXPathCompiledEval(comp, ctxtXPath);
273 xmlXPathFreeCompExpr(comp);
274 if (res == NULL)
275 return(NULL);
276 if (res->type == XPATH_STRING) {
277 ret = res->stringval;
278 res->stringval = NULL;
279 }
280 xmlXPathFreeObject(res);
281 return(ret);
282}
283
284/************************************************************************
285 * *

Callers 6

installResourcesFunction · 0.70
installDirsFunction · 0.70
xsdTestSuiteFunction · 0.70
rngTestSuiteFunction · 0.70
xstcTestInstanceFunction · 0.70
xstcTestGroupFunction · 0.70

Calls 5

xmlXPathCompileFunction · 0.85
fprintfFunction · 0.85
xmlXPathCompiledEvalFunction · 0.85
xmlXPathFreeCompExprFunction · 0.85
xmlXPathFreeObjectFunction · 0.85

Tested by

no test coverage detected