File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -315,16 +315,34 @@ __xml_next(xmlNode * child)
315
315
return child ;
316
316
}
317
317
318
+ static inline xmlNode *
319
+ __xml_first_child_element (xmlNode * parent )
320
+ {
321
+ xmlNode * child = NULL ;
322
+
323
+ if (parent ) {
324
+ child = parent -> children ;
325
+ }
326
+
327
+ while (child ) {
328
+ if (child -> type == XML_ELEMENT_NODE ) {
329
+ return child ;
330
+ }
331
+ child = child -> next ;
332
+ }
333
+ return NULL ;
334
+ }
335
+
318
336
static inline xmlNode *
319
337
__xml_next_element (xmlNode * child )
320
338
{
321
- if (child ) {
339
+ while (child ) {
322
340
child = child -> next ;
323
- while (child && child -> type ! = XML_ELEMENT_NODE ) {
324
- child = child -> next ;
341
+ if (child && child -> type = = XML_ELEMENT_NODE ) {
342
+ return child ;
325
343
}
326
344
}
327
- return child ;
345
+ return NULL ;
328
346
}
329
347
330
348
void free_xml (xmlNode * child );
You can’t perform that action at this time.
0 commit comments