日期:2014-05-20 浏览次数:20731 次
public NodeList getContent(String XmlTarget, String Condition) {
// TODO Auto-generated method stub
for (int i = 0; i < nodes.getLength(); i++) {
Node result = nodes.item(i);
if (result.getNodeType() == Node.ELEMENT_NODE
&& result.getNodeName().equals(XmlTarget)) {
NodeList ns = result.getChildNodes();
return ns;
} else {
return null;
}
}
}
package com.meritit.test;
import java.util.ArrayList;
import java.util.List;
public class Test {
public static void main(String[] args) {
System.out.println(check());
}
public static boolean check(){
List<String> list = new ArrayList<String>();
for (int i = 0; i < list.size(); i++) {
return true;
}
return false;
}
}
输出结果false