Added xpath query function that returns names and ids for desired elements