for(Iterator j = element.elementIterator();j.hasNext();){
Attribute attribute = (Attribute) j.next();
System.out.println(attribute.getName() +","+attribute.getValue());
}Element和Attribute 不是一个概念,为何要强转呢?如果想拿到Attribute ,有API: element.attributes()。
Attribute attribute = (Attribute) j.next();
System.out.println(attribute.getName() +","+attribute.getValue());
}Element和Attribute 不是一个概念,为何要强转呢?如果想拿到Attribute ,有API: element.attributes()。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货