Bonjour,
j'ai deux fichiers XML que je veux fusionner en utilisant jdom:

fichier1:

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
<?xml version="1.0" encoding="UTF-8"?>
<Part:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:Part="http://Part/1.0">
  <Participant ParticipantName="Subscriber">
    <Port>
      <RequestPort Name=":~Event"/>
    </Port>
  </Participant>
  <Participant ParticipantName="Publisher">
    <Port>
      <ServicePort Name=":Event"/>
    </Port>
  </Participant>
  <Assemblage>
    <ServiceChannel NameChannel="PushS_P"/>
  </Assemblage>
  <Assemblage>
    <ServiceChannel NameChannel="PushP_S"/>
  </Assemblage>
  <ProviderInterface Origine="//@Assemblage.0" Destinataire="//@Participant.0/@Port.0"/>
  <ProviderInterface Origine="//@Assemblage.1" Destinataire="//@Participant.1/@Port.0"/>
  <RequireInterface Origine="//@Participant.1/@Port.0" Destinataire="//@Assemblage.0"/>
  <RequireInterface Origine="//@Participant.0/@Port.0" Destinataire="//@Assemblage.1"/>
</Part:Root>
fichier2:

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
<?xml version="1.0" encoding="UTF-8"?>
<Part:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:Part="http://Part/1.0">
  <Participant ParticipantName="Consumer">
    <Port>
      <RequestPort Name=":~Event1"/>
    </Port>
  </Participant>
  <Participant ParticipantName="Producer">
    <Port>
      <ServicePort Name=":Event1"/>
    </Port>
  </Participant>
  <Assemblage>
    <ServiceChannel NameChannel="PushP_C"/>
  </Assemblage>
  <Assemblage>
    <ServiceChannel NameChannel="PushC_P"/>
  </Assemblage>
  <ProviderInterface Origine="//@Assemblage.0" Destinataire="//@Participant.1/@Port.0"/>
  <ProviderInterface Origine="//@Assemblage.1" Destinataire="//@Participant.0/@Port.0"/>
  <RequireInterface Origine="//@Participant.0/@Port.0" Destinataire="//@Assemblage.0"/>
  <RequireInterface Origine="//@Participant.1/@Port.0" Destinataire="//@Assemblage.1"/>
</Part:Root>
Quelqu'un a un code qui peut m'aider?
et merci d'avance