日期:2014-05-20 浏览次数:20807 次
public static void main(String[] args) throws Exception {
SAXReader reader = new SAXReader();
Document document = reader.read(Dom4jTestb.class.getResourceAsStream("test.xml"));
List<Node> list = document.selectNodes("//formats/submit/*");
for(Node node : list) {
System.out.println(node.getName()+":"+node.getText());
}
}