nel salvare un file xml mi sn accorto che nn mi da il risultato sperato...ma mi da 'n' volte gli stessi dati
ecco il codice che penso dia il problema:
Codice PHP:Element mast= new Element("Libro_mastro");
for(int i=0;i<MTabbedP.mp.getComponents().length;i++){
MastP co=(MastP)MTabbedP.mp.getComponent(i);//questo è un pannello con tre campi di testo name,d,a
Element m = new Element("Mastro");
m.setAttribute("id",String.valueOf(i));
m.setText(co.name.getText());
Element d =new Element("Dare");
d.setText(co.d.getText());
Element a =new Element("Avere");
a.setText(co.a.getText());
m.addContent(d);
m.addContent(a);
mast.addContent(m);
}

Rispondi quotando