' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
Imports System
Imports System.Linq
Imports System.Xml.Linq

Namespace E
	Public Class Program
		Public Shared Sub Main(args As String())
			Dim doc As New XDocument()
			Dim all As New XElement("all")
			For i As Integer = 1 To 5
				all.Add(New XElement("one", "Element #" & i))
			Next
			doc.Add(all)
			doc.Save("C:\test5.xml")
		End Sub
	End Class
End Namespace
