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

sql server - MSSQL Text and Varchar(MAX) fields shown (MEMO) in DBGrid -

php - Changing the visibility scope of parent methods in child classes -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -