* xmlXPathNewNodeSet: * @val: the NodePtr value * * Create a new xmlXPathObjectPtr of type NodeSet and initialize * it with the single Node @val * * Returns the newly created object. */
| 3386 | * Returns the newly created object. |
| 3387 | */ |
| 3388 | xmlXPathObjectPtr |
| 3389 | xmlXPathNewNodeSet(xmlNodePtr val) { |
| 3390 | xmlXPathObjectPtr ret; |
| 3391 | |
| 3392 | ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); |
| 3393 | if (ret == NULL) |
| 3394 | return(NULL); |
| 3395 | memset(ret, 0 , sizeof(xmlXPathObject)); |
| 3396 | ret->type = XPATH_NODESET; |
| 3397 | ret->boolval = 0; |
| 3398 | ret->nodesetval = xmlXPathNodeSetCreate(val); |
| 3399 | if (ret->nodesetval == NULL) { |
| 3400 | xmlFree(ret); |
| 3401 | return(NULL); |
| 3402 | } |
| 3403 | /* @@ with_ns to check whether namespace nodes should be looked at @@ */ |
| 3404 | return(ret); |
| 3405 | } |
| 3406 | |
| 3407 | /** |
| 3408 | * xmlXPathNewValueTree: |
no test coverage detected