C implementation: next_child => next_sibling