<?xml version="1.0" encoding="utf-8" ?>
<class>
<student id="1">
<name>黄友敏</name>
<sex>男</sex>
<age>22</age>
<subject>
<name>数学</name>
<score>98.5</score>
<name>语文</name>
<score>100</score>
</subject>
<parent>黄,刘</parent>
</student>
</class>
XMLConfiguration config = new XMLConfiguration("student.xml")
取节点:
config.getString("student.name"):黄友敏
取节点属性:
config.getString("student[@id]") :1
取list:返回的list中的对象为String类型
config.getList("student.subject.score")