Returns an object list with all IDs or NAMEs within an element or document.