Module Program
Sub Main()
Dim doc As XElement = XElement.Load("Inventory.xml")
For i As Integer = 0 To 4
Dim newCar As New XElement("Car", _
New XAttribute("ID", i + 1000), _
New XElement("Color", "Green"), _
New XElement("Make", "Ford"), _
New XElement("PetName", ""))
doc.Add(newCar)
Next
Console.WriteLine(doc)
End Sub
End Module
|