Sub test()
Dim oCreation As Object, Balise, I&, racine, translation, chemin$, rep
Set xmldoc = CreateObject("Microsoft.XMLDOM") 'creation
Set racine = xmldoc.createelement("MUSIC") 'ajout de la racine "music"
xmldoc.appendchild racine 'insertion dans le document (append) de la racine
Set oCreation = xmldoc.createProcessingInstruction("xml", "version=""1.0"" encoding=""UTF-8""") 'creation de l'entete du process
xmldoc.InsertBefore oCreation, xmldoc.ChildNodes.Item(0) 'insertion parametre process
DerLig = ActiveSheet.Range("A65500").End(xlUp).Row
For I = 2 To DerLig
If Cells(I, 1) <> "" Then
Set Balise = xmldoc.createelement("message")
racine.appendchild (Balise)
Set Source = xmldoc.createelement("source"): Source.Text = Cells(I, 1)
Balise.appendchild (Source)
Set translation = xmldoc.createelement("translation"): translation.Text = Cells(I, 2)
Balise.appendchild (translation)
End If
Next
chemin = ThisWorkbook.Path & "\toto.xml" 'chemin à adapter
xmldoc.Save chemin
rep = MsgBox("voulez voir voir le résultat dans IE", vbYesNo)
If rep = vbYes Then
With CreateObject("internetexplorer.application")
.Visible = True
.navigate chemin
End With
End If
End Sub