public void synchroGraphicalToXml(){
Document doc=this.buildDocument();
if(doc==null)return;
TransformerFactory factory=TransformerFactory.newInstance();
try{
Transformer transformer=factory.newTransformer();
transformer.setOutputProperty("encoding","utf-8");
transformer.setOutputProperty(OutputKeys.INDENT,"yes");
ByteArrayOutputStream out = new ByteArrayOutputStream();
transformer.transform(new DOMSource(doc),new StreamResult(out));
xmlEditor.getDocumentProvider().getDocument(xmlEditor.getEditorInput()).set(out.toString("utf-8"));
out.close();
}catch(Exception ex){
ex.printStackTrace();
}
}
GraphicalEditorPage.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:bdf2
作者:
评论列表
文章目录