Unified parseNodes and parseChildren.