Document转String

原创 2018年04月17日 14:32:19
private static void myDebug(Document doc){
	try{
		DOMSource source = new DOMSource(doc);
		StringWriter writer = new StringWriter();
		Result result = new StreamResult(writer);
		Transformer transformer = TransformerFactory.newInstance().newTransformer();
		transformer.transform(source, result);
		Log.i("TAG","response:"+ writer.getBuffer().toString());
	}catch(Exception e){
	}

}



收藏助手
不良信息举报
您举报文章:Document转String
举报原因:
原因补充:

(最多只允许输入30个字)