Created
August 15, 2017 20:41
-
-
Save JmzTaylor/5a08a157707edd584652d0825be331f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given this HTML | |
<div class="team-moree"> | |
<h2>Some heading</h2> | |
Bats: Right | |
Throws: Right | |
Position: OF | |
| |
</div> | |
and using this code to read it | |
Elements descs2 = doc.getElementsByClass("team-moree"); | |
for (Element names : descs2) { | |
name = names.select("h2").first().ownText(); | |
bio = names.text().replace(name, ""); | |
} | |
How would I preserve the line breaks in the text? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment