I have a snippet of html which I extracted from the source of a webpage I'm working on:
<span itemprop="homeLocation" itemscope itemtype="http://schema.org/Place"><meta itemprop="name" content="Kansas"/>
...and I'd like to extract the location, Kansas from it, using Xpath.
Using an Xpath checker, I have been testing this but to no avail.
I tried
//*[@itemprop="homeLocation"]/meta[@itemprop="name"]/@content
and similar attempts, but can't seem to get a match. I don't understand what I'm doing wrong.
Any advice would be greatly appreciated.
//span...element instead of//*...?itemscopehas no value and thespanisn't closed.itemscopedon't have the value, but I didn't write the code and there's nothing I can do to change it...