Sub DoXML(CheminCompletVerLeFichier As String)
Dim StrXml As String
With Sheets("Feuil1")
StrXml = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf & _
"<package xmlns=""http://www.w3.org/2001/XMLSchema"" version=""4.5"">" & vbCrLf & _
"<provider>" & .Range("A2") & "</provider>" & vbCrLf & _
"<language>" & .Range("B2") & "</language>" & vbCrLf & _
"<video>" & vbCrLf & _
"<type>" & .Range("D2") & "</type>" & vbCrLf & _
"<subtype>" & .Range("E2") & "</subtype>" & vbCrLf & _
"<vendor_id>" & .Range("F2") & "</vendor_id>" & vbCrLf & _
"<country>" & .Range("G2") & "</country>" & vbCrLf & _
"<original_spoken_locale>" & .Range("H2") & "</original_spoken_locale>" & vbCrLf & _
"<title>" & .Range("I2") & "</title>" & vbCrLf & _
"<synopsis>" & .Range("J2") & "</synopsis>" & vbCrLf & _
"<production_company>" & .Range("K2") & "</production_company>" & vbCrLf & _
"<copyright_cline>" & .Range("L2") & "</copyright_cline>" & vbCrLf & _
"<theatrical_release_date>" & Format(.Range("M2"), "yyyy-mm-dd") & "</theatrical_release_date>" & vbCrLf & _
"<genres>" & vbCrLf & _
"<genre>" & .Range("N2") & "</genre>" & vbCrLf & _
"</genres>" & vbCrLf & _
"</video>" & vbCrLf & _
"</package>"
End With
Dim AdoStream As Object
Set AdoStream = CreateObject("ADODB.Stream")
AdoStream.Open
AdoStream.Type = 2
AdoStream.Position = 0
AdoStream.Charset = "utf-8"
AdoStream.WriteText StrXml
AdoStream.SaveToFile CheminCompletVerLeFichier, 2
AdoStream.Close
Set AdoStream = Nothing
End Sub