cannot access value of attribute using xpath -


i not able value of second attribute based on first attribute. try value of content attribute. i.e. 4,450 out of following xml:

<meta itemprop="price" content=" 4,450" /> 

tried xpath: //meta[@itemprop=\"price\"][@content] i'm getting output similar input xml.

you need slash before content attribute:

//meta[@itemprop='price']/@content 

Comments

Popular posts from this blog

html - jquery - p element wont show after I hid it -

python - BeautifulSoup: How to get the nearest tag -

php - Return Last Insert ID with PDO -