| 97 | } |
| 98 | |
| 99 | xmlNodePtr XPathWrapper::node(unsigned int index) |
| 100 | { |
| 101 | if (!mResult) { |
| 102 | return NULL; |
| 103 | } |
| 104 | |
| 105 | if (mResult->type != XPATH_NODESET) { |
| 106 | return NULL; |
| 107 | } |
| 108 | |
| 109 | if (xmlXPathNodeSetIsEmpty(mResult->nodesetval)) { |
| 110 | return NULL; |
| 111 | } |
| 112 | |
| 113 | if (index >= (unsigned int) mResult->nodesetval->nodeNr) { |
| 114 | return NULL; |
| 115 | } |
| 116 | |
| 117 | return mResult->nodesetval->nodeTab[index]; |
| 118 | } |
no outgoing calls
no test coverage detected