VB Code:
Private Sub AddScores()
Dim lonLoop As Long, strCur() As String
Dim ff As Integer
ff = FreeFile
Open "test.xml" For Output As #ff
Print #ff, "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>"
Print #ff, "<rss version=""2.0"">"
With lvScore
.ListItems.Clear
For lonLoop = 1 To colScores.Count
strCur = Split(colScores.Item(lonLoop), ":")
.ListItems.Add , , strCur(0)
.ListItems(.ListItems.Count).ListSubItems.Add , , strCur(1)
Print #ff, "<game>"
Print #ff, "<teama>" & Trim(strCur(0)) & "</teama>"
If Val(strCur(1)) > 0 Then
Print #ff, "<sce>" & strCur(1) & "</sce>"
Else
Print #ff, "<sce>" & Replace(strCur(1), " ", "", vbTextCompare) & "</sce>"
End If
Print #ff, "</game>"
Next lonLoop
End With
Print #ff, "</rss>"
Close #ff
End Sub