| 196 | } |
| 197 | |
| 198 | xmlNode* |
| 199 | find_entity(xmlNode *parent, const char *node_name, const char *id) |
| 200 | { |
| 201 | xmlNode *a_child = NULL; |
| 202 | for(a_child = __xml_first_child(parent); a_child != NULL; a_child = __xml_next(a_child)) { |
| 203 | /* Uncertain if node_name == NULL check is strictly necessary here */ |
| 204 | if(node_name == NULL || strcmp((const char *)a_child->name, node_name) == 0) { |
| 205 | if(id == NULL || strcmp(id, ID(a_child)) == 0) { |
| 206 | crm_trace("returning node (%s).", |
| 207 | crm_element_name(a_child)); |
| 208 | return a_child; |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | crm_trace("node <%s id=%s> not found in %s.", |
| 214 | node_name, id, crm_element_name(parent)); |
| 215 | return NULL; |
| 216 | } |
| 217 | |
| 218 | void |
| 219 | copy_in_properties(xmlNode* target, xmlNode *src) |
no test coverage detected