<img>
終了タグがオプションのタグがいくつかあります。
String xml = "<div><img href=""></div>";
以下のコードでドキュメントオブジェクトに変換されません
DocumentBuilderFactory factory =
DocumentBuilderFactory. DocumentBuilder builder;
builder = factory.newDocumentBuilder();
Document doc = builder.parse(xml);
エラーは
The markup in the document preceding the root element must be well-formed.