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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -