你可以这样做:
Transformer trans = TransformerFactory.newInstance().newTransformer();
trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doc.getDoctype().getSystemId());
trans.transform(new DOMSource(doc), new StreamResult(out));
这样就可以保留doc中的systemid了
Transformer trans = TransformerFactory.newInstance().newTransformer();
trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doc.getDoctype().getSystemId());
trans.transform(new DOMSource(doc), new StreamResult(out));
这样就可以保留doc中的systemid了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货