How to retieve specific text from a tag without using contains() and xpath?
How to retieve specific text from a tag without using contains() and xpath? <div> <label1>Hulk</label1> <label2>Ironman</label2> Thor </div> How do I get only Thor text without using contains in xpath ? If I try getting text of div it would give me all the 3(Hulk,Ironman,Thor) but I want only Thor. Show how did you try, current and desired output, add tag for your programming language – Andersson Jul 2 at 10:21 Assuming that the typo <label1? is fixed, and that there are no other div s in the document, //div/text() will select Thor . – jsheeran Jul 2 at 10:29 <label1? div //div/text() Thor @jsheeran ,...