Bonjour,

Je souhaiterais trier un fichier xml.
Je m'explique:

Exemple:

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
 
<Principal>
   <personne identif="201230"> 
      <ses infos>
   </personne
       <PersonneSousSaCharge1>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
</Principal>
 
<Principal>
   <personne identif="19"> 
      <ses infos>
   </personne
       <PersonneSousSaCharge5>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
</Principal>
 
<Principal>
   <personne identif="201230"> 
      <ses infos>
   </personne
       <PersonneSousSaCharge2>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
</Principal>
Et j'aimerais que mon fichier se tri ainsi:

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
 
<Principal>
   <personne identif="201230"> 
      <ses infos>
   </personne
       <PersonneSousSaCharge>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
       <PersonneSousSaCharge2>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
</Principal>
 
<Principal>
   <personne identif="19"> 
      <ses infos>
   </personne
       <PersonneSousSaCharge>
            <UnAchat></UnAchat>
            <UnAchat></UnAchat>
       </PersonneSousSaCharge>
</Principal>

J'espère avoir été claire.