DOM4J问题大家帮忙一下 <?xml version="1.0" encoding="utf-8"?><result><state value="1005"/><barcodeid value="-1" /><inputcode value="-1" /><barcodeurl value="http://" /></result>如何获取 state barcodeid inputcode barcodeurl的值 谢谢大家献上代码 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵,我还在这研究呢。GOOD LUCK...... 唉 我还建了个项目写了代码 /** * <?xml version="1.0" encoding="utf-8"?><result><state value="1005"/><barcodeid value="-1" /><inputcode value="-1" /><barcodeurl value="http://www.gbsou.com" /></result> * @param args * @throws Exception */ public static void main(String[] args) throws Exception { SAXReader reader = new SAXReader(); Document doc = reader.read(new File("D:/workspace/20100510/struts2tree/struts2tree/src/test.xml")); String state = doc.selectSingleNode("//state").getStringValue(); System.out.println(state); }楼主还是蛮强的。 JFF.楼主,把你解决的代码贴下,学习学习 jsp中错误页面跳转问如404跳到自己定义的页面去 爬虫中文参数的编码问题 问些问题? java如何将oracle中的数据转换成xml格式文件。 小弟利用jstl作了一个86万的数据分页显示的jsp,有兴趣的请会email 请问chinajsp.com的空间谁用过?怎么样? 页面上的模糊查询问题,亟待解决!!! 怎么通过程序的方式改动xml文件的属性? 在IE里控制打印宽度和长度,实现在印刷好的固定格式的纸上打印!!!急!!! 哪位有电子版JBUILDER X的中文版入门书???急用啊!!!! struts2.0 checkbox 赋值问题 想让一个html 文件在gae 上跑起来。
GOOD LUCK......
* <?xml version="1.0" encoding="utf-8"?>
<result>
<state value="1005"/>
<barcodeid value="-1" />
<inputcode value="-1" />
<barcodeurl value="http://www.gbsou.com" />
</result>
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
SAXReader reader = new SAXReader();
Document doc = reader.read(new File("D:/workspace/20100510/struts2tree/struts2tree/src/test.xml"));
String state = doc.selectSingleNode("//state").getStringValue();
System.out.println(state);
}
楼主还是蛮强的。