java - how to use Jsoup to put text in different lines -


this question exact duplicate of:

i using jsoup extract data website , appending text box in application. want when codes find full stop in text changes line. how can jsoup? there method this? here code:

org.jsoup.nodes.document doc = jsoup.connect("link here").get(); org.jsoup.select.elements els = doc.select("p"+"\r\n");  stringbuilder sb = new stringbuilder();  (org.jsoup.nodes.element el : els) { sb.append(el.text());} txtarea.settext(sb.tostring()); txtarea.setlinewrap(true); system.out.println(sb.tostring()); 

if understand want think should select this:

doc.select("p") 

and append this

for (org.jsoup.nodes.element el : els) {     sb.append(el.text());     sb.append(system.getproperty("line.separator")); } 

but not sure meant "when codes find full stop in text"


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -