Dim header As String = "<?xml version=""1.0"" encoding=""UTF-8""?>"
Dim ISO8859 As String = "<?xml version=""1.0"" encoding=""ISO-8859-1""?>"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nombre_xml As String = "archivo.xml"
'Dim root As String = "<DATA></DATA>"
Dim xml As New XmlDocument
Dim node As XmlNode = xml.CreateXmlDeclaration("1.0", "UTF-8", Nothing)
xml.InnerXml = node.OuterXml & "<data><conex></conex><creacion>" & Now.ToString("yyyy-MM-ddTHH:mm:ss") & "</creacion><actualizacion></actualizacion></data>"
Dim settings As New XmlWriterSettings
settings.Indent = True
Dim out As XmlWriter = XmlWriter.Create(nombre_xml, settings)
xml.Save(out)
out.Close()
'xml.Save(nombre_xml)
MessageBox.Show("fin!")
End Sub
No hay comentarios.:
Publicar un comentario