* xmlXPathNodeToNumberInternal: * @node: a node * * Converts a node to its number value * * Returns the number value */
| 4881 | * Returns the number value |
| 4882 | */ |
| 4883 | static double |
| 4884 | xmlXPathNodeToNumberInternal(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: |
no test coverage detected