* xmlXPathCastNodeSetToString: * @ns: a node-set * * Converts a node-set to its string value. * * Returns a newly allocated string. */
| 4744 | * Returns a newly allocated string. |
| 4745 | */ |
| 4746 | xmlChar * |
| 4747 | xmlXPathCastNodeSetToString (xmlNodeSetPtr ns) { |
| 4748 | if ((ns == NULL) || (ns->nodeNr == 0) || (ns->nodeTab == NULL)) |
| 4749 | return(xmlStrdup((const xmlChar *) "")); |
| 4750 | |
| 4751 | if (ns->nodeNr > 1) |
| 4752 | xmlXPathNodeSetSort(ns); |
| 4753 | return(xmlXPathCastNodeToString(ns->nodeTab[0])); |
| 4754 | } |
| 4755 | |
| 4756 | /** |
| 4757 | * xmlXPathCastToString: |
no test coverage detected