Private Sub btn_envio_xml_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_envio_xml.Click
Dim lineas As New ArrayList
Dim txt() As String = File.ReadAllLines("D:\z\brown\tasks\tasks\bin\Debug\DTEOK\DTE33F10331.xml", Encoding.GetEncoding("ISO-8859-1"))
lineas.AddRange(txt)
lineas.Insert(1, "<SetGESYS xmlns=""http://www.sii.cl/SiiDte"">")
lineas.Insert(2, " <Extras>")
lineas.Insert(3, " </Extras>")
lineas.Add("</SetGESYS>")
'txt(1) = " <EnvioDTE xmlns=""http://www.sii.cl/SiiDte"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""http://www.sii.cl/SiiDte EnvioDTE_v10.xsd"" version=""1.0"">"
'txt(1) = "<SetGESYS xmlns=""http://www.sii.cl/SiiDte"">"
'File.WriteAllText("D:\z\brown\tasks\tasks\bin\Debug\DTEOK" & "\" & "gesys.xml2", , System.Text.Encoding.GetEncoding("ISO-8859-1")) ' sólo prueba
File.WriteAllLines("D:\z\brown\tasks\tasks\bin\Debug\DTEOK" & "\" & "archivo.xml", lineas.Cast(Of String).ToArray, System.Text.Encoding.GetEncoding("ISO-8859-1"))
End Sub
No hay comentarios.:
Publicar un comentario