我有这个我想抓取的 HTML:
<textarea name="notes" rows="5" cols="60">some notes go here
and more including a blank line:
and another new
line
etc
etc
</textarea>
因为它们在文本区域中,所以没有 brs 或 \n。我可以很容易地得到全文:
Element notes = doc.select("textarea[name=notes]").first();
String notesStr = notes.text();
但是当我想在editText中显示结果时,它作为单行返回,如下所示:
some notes go here
and more including a blank line:
and another new
line
etc
etc