Please look at the following simplified example:
public static void main(String[] args) {
String html = "<html>\n" +
" <head></head>\n" +
" <body>\n" +
" <div> \n" +
" <p> 2 <= X </p> \n" +
" </div>\n" +
" </body>\n" +
"</html>";
Document doc = Jsoup.parse(html);
System.out.println(doc.select("p").outerHtml());
}
This prints out <p> 2 <= X </p>
but i am expecting the selected html part to be printed out as it was : <p> 2 <= X </p>
. How can i tell jsoup not to convert the '<' symbol?