Hello,
i am currently having a small problem with parsing an XML with XmlSax.
i have a list of categories in the xml and the additional entries that are related to there categories.
now i parse the categories id like that
now i parse the items in another activity exactly like that with
it works really nice until i get to a category id with 10.
now items that should only visible in category 10 show up in category 1 too.
And debugging shows that the var rezCatA really shows the value 1.
but when i am opening category 10 it shows category 10.
am i doing something wrong here? or must be the error somewhere else?
I always think that
should be
but that does not work of course.
Thanks for every hint.
i am currently having a small problem with parsing an XML with XmlSax.
i have a list of categories in the xml and the additional entries that are related to there categories.
now i parse the categories id like that
B4X:
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
If parser.Parents.IndexOf("kategorieliste-a") > -1 Then
If Name = "id" Then
katId = Text.ToString
End If
If katTitle <> "" AND katId <> "" Then
ListViewCat1.AddSingleLine2(katTitle, katId) 'add the title as the text and the link as the value
End If
End If
End Sub
now i parse the items in another activity exactly like that with
B4X:
If parser.Parents.IndexOf("rezeptliste") > -1 Then
If Name = "kat-a" Then
rezCatA = Text.ToString
End If
If rezTitle <> "" AND rezDesc <> "" AND rezId <> "" AND ( rezCatA <> "" AND rezCatA = Main.activeCatAid ) Then
ListViewRez.AddTwoLines2(rezTitle, rezDesc, rezId)
End If
End If
it works really nice until i get to a category id with 10.
now items that should only visible in category 10 show up in category 1 too.
And debugging shows that the var rezCatA really shows the value 1.
but when i am opening category 10 it shows category 10.
am i doing something wrong here? or must be the error somewhere else?
I always think that
B4X:
rezCatA = Main.activeCatAid
B4X:
rezCatA == Main.activeCatAid
Thanks for every hint.