java.lang.IndexOutOfBoundsException
bonsoir :salut:
j'ai un fichier xml j'ai fait un petit programme pour changer sa structure
c'est à dire je fais une extraction des balises du fichier 1 et les insérer dans les
balises du fichier 2 et à chaque fois j'ai fait un test
Code:
1 2 3 4 5 6 7
|
if (racine.getChild("Nationalite")==null)
N="";
else
N=racine.getChild("Nationalite").getText();
...
PersonalData.addContent(new Element("Nationality").setText(N)); |
le code fonctionne normalement mais dans des cas rares il me génère cette exception
Code:
1 2 3 4 5
|
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 34 Size: 34
at org.jdom.ContentList.get(ContentList.java:377)
at org.jdom.ContentList$FilterList.get(ContentList.java:582)
at javaapplication5.Creation.main(Creation.java:119) |
S'il vous plaît aidez moi pour corriger cette exception :( :cry: :cry:
Cordialement