随笔分类 -  dom4j

摘要:dom4j 中要迭代某个元素的所有子元素:for(Iterator it=root.elementIterator();it.hasNext()){Element element =it.hasNext();……}Iterator是Java迭代器最简单的实现,为List设计的ListIterator... 阅读全文
posted @ 2015-09-09 11:07 燕萧云
摘要:public void BaseOperation(){//创建一个documentDocument document=DocumentHelper.createDocument();//创建根结点Element root=document.addElement("root");//为根结点添加一个... 阅读全文
posted @ 2015-09-09 11:02 燕萧云
摘要:要使用dom4j读写XML文档,需要先下载dom4j包,dom4j官方网站在 http://www.dom4j.org/目前最新dom4j包下载地址:http://nchc.dl.sourceforge.net/sourceforge/dom4j/dom4j-1.6.1.zip解开后有两个包,仅操作... 阅读全文
posted @ 2015-09-09 11:01 燕萧云