Skip to content

Instantly share code, notes, and snippets.

@JonasCz
Created May 10, 2015 07:01
Show Gist options
  • Save JonasCz/20289e774bd2ba2b1a5d to your computer and use it in GitHub Desktop.
Save JonasCz/20289e774bd2ba2b1a5d to your computer and use it in GitHub Desktop.
public class JSoupTest {
public static void main(String[] args) throws IOException {
String myHtml = "<A HREF=\"junklink\">Junk Info</A>&nbsp;&nbsp;Link Id: A2&nbsp;&nbsp;<A HREF=\"Junk Link></A>";
Document doc = Jsoup.parseBodyFragment(myHtml, "http://your.baseurl");
System.out.println(doc.text());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment