'rssParseStream, rssParseExit, rssItems are global variable
rssParseStream = File.OpenInput(File.DirDefaultExternal, "RSS.xml")
Try
rssParseExit = False
rssItems = 0
ParseR.Parse(rssParseStream, "Parser")
Catch
If rssParseExit = False Then
Log("Parserss error: " & LastException.Message)
CallSubDelayed2(Main, "RSS_onError","RSS hiba: " & LastException.Message )
else
'stream.closed exception - I did :-)
End If
End Try
...
Sub Parser_StartElement(Uri As String, Name As String, Attributes As Attributes)
....
If rssItems> 100 Then
rssParseExit = True
rssParseStream.Close
end if
rssItems = rssItems + 1
...
End sub