Generar XML con VB.Net 2010

Aquí les dejo un pequeño ejemplo de como generar un archivo XML.

Dim settings As New XmlWriterSettings()
settings.Indent = True
settings.IndentChars = " "
Using writer As XmlWriter = XmlWriter.Create("C:\Download\books.xml", settings)
	writer.WriteElementString("<Nombre Campo>", "<Valor>")
	writer.WriteElementString("Product1", "50 Kg")
	writer.WriteElementString("Product2", "$ 500.23")
End Using


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s