Bonjour
je cherche a ajouter toute une série d'éléments dans un fichier xml déjà créé
J'ai téléchargé jdom, j'arrive très bien a parcourir chacun de mes fichiers xml, mais je n'arrive pas a ajouter d'élément à l'intérieur de ce fichier
Voila un exemple:
Mon fichier xml est le suivant:
et je voudrai rajouter
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 <?xml version="1.0" standalone="yes"?> <AllIRD> <IRD> <nom>DTI-1001</nom> <description>IRD utilise par l'operateur DTI-1001 de Thomson</description> <logo>O:\\02-Projets\\VALMA\\Documents\\Logo_decodeurs\\thomson-logo.gif</logo> <connexion> <vitesse>38400</vitesse> <nbBits>8</nbBits> <parite>0</parite> <bitStop>1</bitStop> </connexion> <trame> <trameT1>1D</trameT1> <trameT2>2E</trameT2> <trameT1Int>29</trameT1Int> <trameT2Int>46</trameT2Int> <bitPerField>2</bitPerField> <decoderRef>MSTB1 </decoderRef> </trame> </IRD> <IRD> <nom>canalSat</nom> <description>IRD utilise par l'operateur CanalSatellite</description> <logo>O:\\02-Projets\\VALMA\\Documents\\Logo_decodeurs\\logocanalSat.gif</logo> <connexion> <vitesse>9600</vitesse> <nbBits>8</nbBits> <parite>0</parite> <bitStop>1</bitStop> </connexion> <trame> <trameT1>1E</trameT1> <trameT2>2F</trameT2> <trameT1Int>30</trameT1Int> <trameT2Int>47</trameT2Int> <bitPerField>1</bitPerField> <decoderRef>S2 CANAL</decoderRef> </trame> </IRD> </AllIRD>
Si quelqu'un a une idee
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 <IRD> <nom>TPS</nom> <description>IRD utilise par l'operateur TPS</description> <logo>O:\\02-Projets\\VALMA\\Documents\\Logo_decodeurs\\logo_tps.gif</logo> <connexion> <vitesse>38400</vitesse> <nbBits>8</nbBits> <parite>0</parite> <bitStop>1</bitStop> </connexion> <trame> <trameT1>1D</trameT1> <trameT2>2E</trameT2> <trameT1Int>29</trameT1Int> <trameT2Int>46</trameT2Int> <bitPerField>2</bitPerField> <decoderRef>0 </decoderRef> </trame> </IRD>
Merci d'avance
Partager