public static Element parseBodyFragment ( String content ) { Document doc = Jsoup . parseBodyFragment ( content ) ; return doc . body ( ) ; }
A generic method to use jsoup parser on an arbitrary HTML body fragment . Allows writing HTML manipulations in the template without adding Java code to the class .