准html文本,看起来像:
 Simple<br> text <b>simple</b> text simple <BR><BR>text simple text,我想解析它并创建dom文档.但问题是关闭未封闭的标签,当我尝试这个:
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
InputSource source = new InputSource(new StringReader(
Document doc = builder.parse(source);
发生错误: org.xml.sax.SAXParseException;  The element type "br" must be terminated by the matching end-tag
我不想更换所有<br>通过<br></br>,任何解决方案或建议吗?