I used JSoup to parse texts, and so far it has been great, but ran into a problem.
I can use Node.html()to return the full HTML of the desired node, which saves line breaks as such:
Glóandi augu, silfurnátt
<br />Blóð alvöru, starir á
<br />Óður hundur er í vígamóð, í maga... mér
<br />
<br />Kolniður gref, kvik sem dreg hér
<br />Kolniður svart, hvergi bjart né
But, unfortunately, it has a side effect of storing objects and HTML tags.
However, if I use Node.text(), I can get a more beautiful result, without tags and entities:
Glóandi augu, silfurnátt Blóð alvöru, starir á Óður hundur er í vígamóð, í maga... mér Kolniður gref, kvik sem dreg hér Kolniður svart,
Who has another unfortunate side effect of removing line breaks and single line compression.
Just replacing it <br />with a node before the call Node.text()gives the same result, and it seems that this method compresses the text on one line of the method itself, ignoring new lines.
, , ?