Element traversal for document fragment