Reputation: 292
I want to parse the text in span class with Jsoup. Here is my Html code portion.
<html>
<head></head>
<body>
<div>
<div class = "abcd">
<span> This is text </span>
</div>
<div>
</body>
</html>
I wrote something like that
Element element = doc.select("div.abcd > span");
System.out.println("Text = "+element.text());
This isn't working. Is there any other way to do this?
Upvotes: 4
Views: 1549