So here is what I want to do to start off here is a simple sample HTML code
<html>
<body>
<b>This a test <br>ABCD</b>
</body>
</html>
So now how can I get only the text “This a test”
I tried to do something like this “/html/body/b” but I get “ABCD” as the output? What can I do to get “This is a test“?
The XPath expression could be:-
This may provide you the string “
This a test“.Hope it helps.