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

Function xmlXPathNodeToNumberInternal

ThirdParty/libxml2/vtklibxml2/xpath.c:4883–4899  ·  view source on GitHub ↗

* xmlXPathNodeToNumberInternal: * @node: a node * * Converts a node to its number value * * Returns the number value */

Source from the content-addressed store, hash-verified

4881 * Returns the number value
4882 */
4883static double
4884xmlXPathNodeToNumberInternal(xmlXPathParserContextPtr ctxt, xmlNodePtr node) {
4885 xmlChar *strval;
4886 double ret;
4887
4888 if (node == NULL)
4889 return(xmlXPathNAN);
4890 strval = xmlXPathCastNodeToString(node);
4891 if (strval == NULL) {
4892 xmlXPathPErrMemory(ctxt);
4893 return(xmlXPathNAN);
4894 }
4895 ret = xmlXPathCastStringToNumber(strval);
4896 xmlFree(strval);
4897
4898 return(ret);
4899}
4900
4901/**
4902 * xmlXPathCastNodeToNumber:

Callers 3

xmlXPathCastNodeToNumberFunction · 0.85
xmlXPathCompareNodeSetsFunction · 0.85
xmlXPathSumFunctionFunction · 0.85

Calls 3

xmlXPathCastNodeToStringFunction · 0.85
xmlXPathPErrMemoryFunction · 0.85

Tested by

no test coverage detected