Here you can find the source of parseHTMLDocument(String paramString)
static HTMLDocument parseHTMLDocument(String paramString)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.StringReader; import javax.swing.text.BadLocationException; import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.HTMLEditorKit; public class Main { static HTMLDocument parseHTMLDocument(String paramString) { StringReader localStringReader = new StringReader(paramString); HTMLEditorKit localHTMLEditorKit = new HTMLEditorKit(); HTMLDocument localHTMLDocument = (HTMLDocument) localHTMLEditorKit .createDefaultDocument(); localHTMLDocument.putProperty("IgnoreCharsetDirective", Boolean.TRUE);/*from w ww . ja v a 2s . c o m*/ try { localHTMLEditorKit .read(localStringReader, localHTMLDocument, 0); } catch (IOException localIOException) { System.out.println(localIOException); localIOException.printStackTrace(); return null; } catch (BadLocationException localBadLocationException) { System.out.println(localBadLocationException); localBadLocationException.printStackTrace(); return null; } return localHTMLDocument; } }