Bonjour,

Je suis à la recherche d'un code en vb permettant de réaliser un copy/paste d'une partie de mon xml:

Voici le fichier xml que l'on charge:
Je sais selectionner tous les eléments contenus entre les balises "cvsProduct" mais je ne vois pas comment les copier et les insérer à la suite...

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
 
<NmLoader>
<csvProduct handler="wt.part.LoadPart.createProduct">
  <csvuser /> 
  <csvpartName>Produit</csvpartName> 
  <csvpartNumber>Produit</csvpartNumber> 
  <csvtype>separable</csvtype> 
  <csvsource>make</csvsource> 
  <csvfolder>/Default</csvfolder> 
  <csvlifecycle>Default</csvlifecycle> 
  <csvview /> 
  <csvteamTemplate /> 
  <csvlifecyclestate /> 
  <csvtypedef /> 
  <csvversion /> 
  <csviteration /> 
  <csvparentContainerPath /> 
  </csvProduct>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue">
  <csvdefinition>Results</csvdefinition> 
  <csvvalue1>MyResults</csvvalue1> 
  <csvvalue2 /> 
  <csvdependency_id /> 
  </csvIBAValue>
<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart">
  <csvpublishFlag /> 
  <csvparentContainerPath /> 
  </csvEndWTPart>
</NmLoader>
J'aimerai obtenir ça (c'est à dire la même chose mais avec ce qu il y a entre les balises <NmLoader></NmLoader> dupliqué:

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
44
45
46
47
48
49
50
51
52
53
54
55
56
 
<NmLoader>
<csvProduct handler="wt.part.LoadPart.createProduct">
  <csvuser /> 
  <csvpartName>Produit</csvpartName> 
  <csvpartNumber>Produit</csvpartNumber> 
  <csvtype>separable</csvtype> 
  <csvsource>make</csvsource> 
  <csvfolder>/Default</csvfolder> 
  <csvlifecycle>Default</csvlifecycle> 
  <csvview /> 
  <csvteamTemplate /> 
  <csvlifecyclestate /> 
  <csvtypedef /> 
  <csvversion /> 
  <csviteration /> 
  <csvparentContainerPath /> 
  </csvProduct>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue">
  <csvdefinition>Results</csvdefinition> 
  <csvvalue1>MyResults</csvvalue1> 
  <csvvalue2 /> 
  <csvdependency_id /> 
  </csvIBAValue>
<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart">
  <csvpublishFlag /> 
  <csvparentContainerPath /> 
  </csvEndWTPart>
 
<csvProduct handler="wt.part.LoadPart.createProduct">
  <csvuser /> 
  <csvpartName>Produit</csvpartName> 
  <csvpartNumber>Produit</csvpartNumber> 
  <csvtype>separable</csvtype> 
  <csvsource>make</csvsource> 
  <csvfolder>/Default</csvfolder> 
  <csvlifecycle>Default</csvlifecycle> 
  <csvview /> 
  <csvteamTemplate /> 
  <csvlifecyclestate /> 
  <csvtypedef /> 
  <csvversion /> 
  <csviteration /> 
  <csvparentContainerPath /> 
  </csvProduct>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue">
  <csvdefinition>Results</csvdefinition> 
  <csvvalue1>MyResults</csvvalue1> 
  <csvvalue2 /> 
  <csvdependency_id /> 
  </csvIBAValue>
<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart">
  <csvpublishFlag /> 
  <csvparentContainerPath /> 
  </csvEndWTPart>
</NmLoader>
Savez vous si c'est faisable en VB .Net et si oui pourriez vous me donner une piste.
Merci,
Raph