Selected elements are in the order of their appearance in the document.