扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
我建议您使用JDOM类库,它是为Java
公共类testhibernatehome{
publicstaticvoidmain(String[]args)抛出异常{
StringfileName=“E:/休眠.cfg.xml“//路径
saxbuilderSax=newsaxbuilder()
文档文档=sax.build版本(文件名)
元素el=文档getRootElement()
List
用于(元素e:List){
List
对于(Elementee:listTemp){
Stringpro=ee.getValue值
系统输出打印(“value:”pro)
字符串名称1=ee.getAttributeValue属性(“name”)系统输出打印(“attribute:”name1)]}
list
对于(elementEE:listemp1){
stringmap=ee.getValue值
系统输出打印(“值:”映射)
字符串名称2=ee.getAttributeValue属性(“资源)”)系统输出打印(“属性:”Name2)]}
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流