This is the Div Class main group that all sub groups are under.
Then I have the following 4 room loop types where I am trying to pull just the roomtypecode for each one in a cell from the website using Xpath On Url. I need the “ZZZA”,”GENR”,”DBDB”,”CITY”. in Cell A1,A2,A3, and A4 respectively. But, it will only pull the first roomtypecode for any site.
li class="guestRoomListItem clearfix" data-roomloopcount="1" data-roomtypecode="ZZZA" data-info="{"roomloopcount":"1","roomtypecode":"ZZZA"}">
li class="guestRoomListItem clearfix" data-roomloopcount="2" data-roomtypecode="GENR" data-info="{"roomloopcount":"2","roomtypecode":"GENR"}">
li class="guestRoomListItem clearfix" data-roomloopcount="3" data-roomtypecode="DBDB" data-info="{"roomloopcount":"3","roomtypecode":"DBDB"}">
li class="guestRoomListItem clearfix" data-roomloopcount="4" data-roomtypecode="CITY" data-info="{"roomloopcount":"4","roomtypecode":"CITY"}">
These are the Formula’s I am using now for each request, but it will only pull the first Room type code, even though I have it set to 1, 2, 3, and 4.
=IFERROR(XPathOnUrl($H$26,"//div[@class='guestRoomsResp']/ul/li[1]","data-roomtypecode"),"")
=IFERROR(XPathOnUrl($H$26,"//div[@class='guestRoomsResp']/ul/li[2]","data-roomtypecode"),"")
=IFERROR(XPathOnUrl($H$26,"//div[@class='guestRoomsResp']/ul/li[3]","data-roomtypecode"),"")
=IFERROR(XPathOnUrl($H$26,"//div[@class='guestRoomsResp']/ul/li[4]","data-roomtypecode"),"")
Website is:
http://www.marriott.com/hotels/hotel-rooms/nycmq-new-york-marriott-marquis/