XPath find all elements with specific child node

drzeta

New Member
Could you please help me to find all the elements b which have the child element c in the example below?\[code\]<a> <b name = "b1"></b> <b name = "b2"><c/></b> <b name = "b3"></b></a>\[/code\]The xpath query must return the b2 elementThe second question isI want to combine 2 conditions: I want to get the element which have name = "b2" and has the element cBut this syntax seems not to work: //b[@name='b2' and c]
 
Back
Top