| 2248 | } |
| 2249 | |
| 2250 | xmlNode *first_named_child(xmlNode *parent, const char *name) |
| 2251 | { |
| 2252 | xmlNode *match = NULL; |
| 2253 | for(match = __xml_first_child(parent); match != NULL; match = __xml_next(match)) { |
| 2254 | /* |
| 2255 | * name == NULL gives first child regardless of name; this is |
| 2256 | * semantically incorrect in this funciton, but may be necessary |
| 2257 | * due to prior use of xml_child_iter_filter |
| 2258 | */ |
| 2259 | if(name == NULL || strcmp((const char*)match->name, name) == 0) { |
| 2260 | return match; |
| 2261 | } |
| 2262 | } |
| 2263 | return NULL; |
| 2264 | } |
| 2265 | |
| 2266 | #if 0 |
| 2267 | static void relaxng_invalid_stderr(void * userData, xmlErrorPtr error) |