I've following string which is HTML -
<html>
<head>
<title>Repository</title>
</head>
<body>
<h2>Subversion</h2>
<ul>
<li>
<a href="../">..</a>
</li>
<li>
<a href="branch_A/">branch_A</a>
</li>
<li>
<a href="branch_B/">branch_B</a>
</li>
</ul>
</body>
</html>
Out of this I want to get labels of li
tag which are branch_A
, branch_B
Count of li
's can vary. I want to get all of them. Can you please help how I can parse this String and get those values?
NOTE I could have used jsoup
library to achieve same, but considering our project restriction, I cannot use it.