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?
- use single quotes
- match cases
- watch out brackets use..
try xpath..
//*[contains(@class, 'content')]//li/b[text()='item model number:']/text()
Comments
Post a Comment