用 JDOM 简化 XML 编程 http://www-900.ibm.com/developerWorks/cn/java/j-jdom/index.shtml
解决方案 »
- ssh + json的问题,访问action后,JSON的值却是NULL。
- 问个J2EE开发乱码问题
- hibernate连接oracle11g
- struts2 返回的问题
- fileupload 上传问题
- servlet 和jsp
- 求webservice书籍或教程
- XML在新增或修改节点,中文出现乱码,请各位大虾帮一下
- Exception in thread "main" org.apache.axis2.AxisFault: could not execute query
- 请教服务器端程序加密问题
- 在线等:用到JAXB等第三方包的的applet的打包问题?烦死了,要自杀了
- 高手们帮我介绍几本书贝!
iterator=attributeFields.iterator();
Element subInfoRoot;//subInformation root
while (iterator.hasNext()){
subInfoRoot=(Element)iterator.next();
if (subInfoRoot.getName().trim().equalsIgnoreCase("...")){
------
}
if (Root.getAttributeValue("...").trim().equalsIgnoreCase("..."){
-------
}
}
如此循环遍历下去,应该就可以了。我也是初学,互相学习。
写个递归程序就可以了,很容易实现的。不过用Xpath更简单,可惜我都把递归程序写好了,才学会在JDOM里用Xpath:(