Am sending the XML content item to EditText1 with a button_click event. The last content item gets to EditText1, the log shows the year item incrementing but not the content item.
help me make sense of incrementing the content item please.
ps: I have read lots of XML articles in this loverly forum.
Thanks in advance
B4X:
<?xml version="1.0"?>
<YEARS>
<year>0</year>
<content>First item from the list.</content>
<year>1</year>
<content>Second item from the list.</content>
<year>2</year>
<content>Third item from the list.</content>
<year>3</year>
<content>Forth item from the list.</content>
</YEARS>
B4X:
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
If year = n AND Name = "content" Then
content = Text
End If
EditText1.Text=content
End Sub
Sub nuVrs_Click
Log ("CLICK and content" & content)
Log ("CLICK and year" & n)
Log ("after + content" & content)
EditText1.Text=content 'CONTENT ONLY
n = n + 1 ' Already tried n = n - 1
End Sub
help me make sense of incrementing the content item please.
ps: I have read lots of XML articles in this loverly forum.
Thanks in advance