Bonjour,

j'ai un pb avec une boucle lorsque je recupere des strings,

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
while(iValue.hasNext())
{
 Element courant1 = (Element)iValue.next();
newstring.append(courant1.getAttributeValue("label"));
try
{
//cherche les noeuds Element
//On constitue une list avec tous les Element
List listElement = courant1.getChildren("Element");
//On effectue la vérification en parcourant notre liste de Value
Iterator iElement = listElement.iterator();
while(iElement.hasNext())
 {
 Element courant2 = (Element)iElement.next();
System.out.println(courant1.getValue());
 newstring.append("(").
append(courant2.getAttributeValue("value")).
append("), \r\n");
}
}
catch(Exception e){}
}
je voudrais qu'a la fin de la boucle sa me fasse append("); \r\n"); et non append("), \r\n");

Avez vous une solution svp?