在用Xpash解析XML文件的时候出现一个小问题了,,,

  1. List lis = rootelement.selectNodes("//name");

selectNodes()这个方法返回的是一个List集合, 在使用泛型List的时候不支持,只能用它的父类Node类型 ,为什么呢?

打印的结果是对的。

https://blog.csdn.net/shiluankuang5671/article/details/53979492