Android Question [SOLVED] XMLSax problem

rosippc64a

Active Member
Licensed User
Longtime User
Hi All,
I encountered a big wordpress rss, what xmlsax can't process.. There are a plenty of <content:encoded> (complex node with X:Y) and <![CDATA[ abundant xml text with content and item tags ]]> and looks like it is the problem.
Isn't here a newer version of this lib, because I don't want to rewrite the whole app?
thanks in advance
Steven
 

Attachments

  • rsswordpress.xml
    147.2 KB · Views: 178

rosippc64a

Active Member
Licensed User
Longtime User
In my code I use the usual Parser_EndElement, I manage the "item","title", "link", "pubdate", "description" node names. The first "item" found is ok, but the next "title" what the Parser_EndElement found isn't a real "<title>", but this (the </media:title>):

B4X:
        <media:content url="https://0.gravatar.com/avatar/6b91aeba2511ba0ab759af0c40b63ee5?s=96&#38;d=identicon&#38;r=G" medium="image">
            <media:title type="html">veratar</media:title>
        </media:content>
How can I avoid to recognise this kind of node (<XXXX:title>) ?
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
URI: http://search.yahoo.com/mrss/
Name: title
Text: veratar

and this strange uri is in the top of the xml:
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
It looks like if I exclude the cases when URI.length > 0, then all is ok.
It is the right approach, or it is only a special case?
Maybe I can start understand:
the xmlns:media="http://search.yahoo.com/mrss/" connects the "media" in the <media:title> to the "http://search.yahoo.com/mrss/".

So this is a right approach to exclude the URI.length>0.

XMLSax worked well, I was stupid.

thank you @Erel !!!
 
Last edited:
Upvote 0
Top