有一些标签<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.