Check for current node be null,
Check if this node matches with the current position node
If yes moved to the curr.firstChild and increment currPosition
If not then move to curr.rightSibling and repeat from 1st step
If no match found and reached the end then add all nodes left as firstChild