xml - XPATH: selecting text node with an embedded node -


having following xml code:

<div class="content"> <ul> <li> <b>item model number:</b>    fcc5302q-2 </li> </ul> 

i used xpath expression select li node text:

//*[contains(@class, "content")]//li[b/text()="item model number"]/text() 

and reason fails pick text of li element. going wrong this?

  1. use single quotes
  2. match cases
  3. watch out brackets use..

try xpath..

//*[contains(@class, 'content')]//li/b[text()='item model number:']/text() 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -