[jdom-interest] java.util.ConcurrentModificationException
THIAIMY NGUYEN
thiaimy at hotmail.com
Tue Oct 25 07:48:29 PDT 2005
Hi, I got this message "java.util.ConcurrentModificationException" when I
want to do element.setText("coucou"); in a loop for(Iterator
z=courant.getDescendants();z.hasNext();)
Anyone, can help me??Thanks a lots
-----------------------------------------------------
static void afficheAll1(Element intro,Element p) {
List listRacine = racine.getChildren();
Iterator i = listRacine.iterator();
String introTxt=intro.getName();
String courantTxt;
String pTxt=p.getName();
String chaine;
Element courant1;
String chaine1;
while(i.hasNext()){
Element courant = (Element)i.next();
courantTxt=courant.getName();
if(courantTxt.equals(introTxt)){
for(Iterator z=courant.getDescendants();z.hasNext();){
Object node=z.next();
if(node instanceof Element){
courant1=(Element)node;
String courantNode =courant1.getName();
if(courantNode.equals(pTxt)){
chaine=courant1.getText();
chaine=traitementChaine(chaine);
chaine=traitementChaine1(chaine);
courant1.setText("coucou");
}
}
}
}
}
}
More information about the jdom-interest
mailing list