ok I have some info stored. im making a rss feed out of it,
so the info is about nfl.
it has a team, then the score, then goes on to the next team, and gets a score.
now
for my rss feed, i need this layout.
the <game> style repeats after the first two teams, cuz it takes the first two teams and puts a "VS" in between. (in my asp script).Code:<game> <teamA></teamA> <scoreA> </scoreA> <teamB></teamB> <scoreB> </scoreB> </game> <game> <teamA></teamA> <scoreA> </scoreA> <teamB></teamB> <scoreB> </scoreB> </game>
now the problem im hainvg is puting the "<game></game>" in there.
heres the code:
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




Reply With Quote