Which Is The Best ?xml Parser For Android Or Regex For Stripping Out Xml?
I want to strip out the tags from this page http://ptwc.weather.gov/feeds/ptwc_rss_indian.xml Just I want to take the content between description tags in the above xml a)For this
Solution 1:
You should always use an XML parser. It is much safer and in the end easier to implement. An expression that might work in your tests may break with a nested tag or a minor change in the structure. Also, XML is much more maintainable should you want to retrieve more data from the same files.
Use an XML Parser!
Edit: read an interesting discussion
Solution 2:
I agree with Aleadam in that you should always use an XML Parser but I also believe that an XML parser should not be a hassle to write or use which is why I always recommend using the Simple XML Framework on Android.
So much so that I even wrote a blog post on how to use Simple in Android.
Post a Comment for "Which Is The Best ?xml Parser For Android Or Regex For Stripping Out Xml?"