私の質問は非常に単純です: htmlcontent にこの img-tag のようなタグがある場合、java の html を DOM-Document に解析する方法はありますか?
<p><img src="..."></p>
これは、これらの要素の解析中に SAXException を返す Codesnippet です。
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputStream is = new ByteArrayInputStream( htmlcontent.getBytes());
Document dom = db.parse(is);
is.close();