java使用dom4j解析xml





aaa
bbb
ccc
ddd
eee
fff




Document document = DocumentHelper.parseText(responseText);
Element products = document.getRootElement();//GameChargeResponse
for (Iterator iter = products.elementIterator(); iter.hasNext();) {
Element element = (Element) iter.next();//gameProductList
if("status".equals(element.getName()) || "message".equals(element.getName())){
continue;
}
for(Iterator ite = element.elementIterator(); ite.hasNext();){
Element ele1 = (Element) ite.next();//GameProduct
List list3 = ele1.elements();

你可能感兴趣的:(java)