日期:2014-05-20 浏览次数:20822 次
public class XMLUtils {
public void parseXML() throws DocumentException
{
for(Iterator i = ele.elementIterator();i.hasNext();)
{
Element e = (Element) i.next();
System.out.println("name is: " + e.getName());
System.out.println("value is: " + e.getTextTrim());
vb.setName(e.getName());
vb.setValue(e.getTextTrim());
list.add(vb);
}
}
private List<VarBean> list = new ArrayList();
private VarBean vb = new VarBean();
}
var3 = contentfeeder
var3 = contentfeeder
var3 = contentfeeder
private transient Object[] elementData;
public boolean add(E e) {
ensureCapacityInternal(size + 1); // Increments modCount!!
elementData[size++] = e;
return true;
}
public class XMLUtils {
public void parseXML() throws DocumentException
{
for(Iterator i = ele.elementIterator();i.hasNext();)
{
vb = new VarBean();
Element e = (Element) i.next();
System.out.println("name is: " + e.getName());
System.out.println("value is: " + e.getTextTrim());
vb.setName(e.getName());
vb.setValue(e.getTextTrim());
list.add(vb);
}
}
private List<VarBean> list = new ArrayList();
private VarBean vb;
}