首页 > 其他 > 详细

XML封装消息

时间:2016-04-20 13:10:46      阅读:179      评论:0      收藏:0      [点我收藏+]
Document document = DocumentHelper.createDocument();
document.setXMLEncoding(ChARSET_UTF_8);

Element root = document.addElement("message");
Element head = root.addElement("head");

head.addElement("field").addAttribute("name"," ").setText("");

Element body = root.addElement("body");
body.addElement("field").addAttribute("name","").setText("");

return document.asXML();

一般用于封装消息 发送XML通知等。

XML封装消息

原文:http://www.cnblogs.com/yangsy0915/p/5411757.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!