Android Question Getting image from rss XML

Devv

Active Member
Licensed User
Longtime User
Hi
I'm trying to get the image from an xml site
i'm using xmlsax

this is the site im trying to get the images from

http://feeds.bbci.co.uk/arabic/rss.xml

i tried this

B4X:
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
    If Name="url" Then
       Log(Text.ToString)
    End If
End Sub

but no success any ideas ?
 

Devv

Active Member
Licensed User
Longtime User
The url is an attribute. You should get it in StartElement from the Attributes map.
Thanks for replay Erel

so this way m code is right ?

B4X:
Sub Parser_StartElement(Uri As String, Name As String, Attributes As Attributes)
    If Attributes.Size > 1 Then
    '     Log(Attributes.GetValue(2))
         image = Attributes.GetValue(2)
    End If

End Sub
 
Upvote 0
Top