Android Programming Tutorial - How to parse XML data into a ListView

preview_player
Показать описание


This is a source code walkthrough of a sample project that demonstrates how to parse XML data and display it to the user with a ListView
Рекомендации по теме
Комментарии
Автор

thanks a million dude. your way of explaining and readable code helped me understand xmlparsing a lot

davidglynn
Автор

You are great, both in programming and teaching.
Helped me a lot,
GBU

AtaIravani
Автор

Thanks so much for this video man, really helped with my university coursework. Hero.

stu
Автор

This is one of the best tutorials I've come across. I do have a question, though. How can I get the xml list to display text in a custom font? Although the .xml list displays in utf-8, the font I want to use is DroidSerif-Regular.ttf because it correctly displays the glottal stop and provides a serif to distinguish an "I" from an "L". I've tried to combine several custom font configurations but they haven't worked. Thanks for your hard work and your generosity!

danielpackard
Автор

aye, that happened me too Sarah. Anyhow, great work, nice tutorial, a bit above my level but it is high quality code

davidglynn
Автор

This is a great video and I have managed to adapt the code to my own xml very easily- it works like a dream when connected to the internet (network is available) but does not read the files when the network is not there. Any thoughts?

capechronicler
Автор

Thank you. Very helpful, is it possible using this to implement an ExpandableListView instead of just a ListView? Thanks

wowhedto
Автор

very good tutorial, works fine! thank you!
i tried this with an expandable list, but i didn't get it... maybe you can do a "how to parse  xml into expandable list".. :-)

Therabeat
Автор

You would have to modify the XML parsing part to support RSS. This example parses some customized XML that I created. You could apply the same principals but you need to change the XML tags that you are looking for with the parser to the RSS ones like: "description" "channel" "title" etc...

Zobrombee
Автор

How do i implement this into an app that extends listfragment.I am creating an app that should pull content plus images from a website and this app uses fragments...But i cant seem to be able to pull any rss feed nor understand how its done using json, or parser...Help

crazyantoine
Автор

Thanks for the video Zobrombee, it really helped me.

I've used this example to display stock prices against the stock name in a listview, however I want to change the colour of the text view based on if its negative or positive.

Does anyone know how I would go about doing this?

tomblears
Автор

This video was a great help. Thanks a lot!

quieromicubita
Автор

thank you for making it so much clearer Paul Singapore

paulhealy
Автор

hi good tutorial, but i need to insert a feed link of another website....it can help me same?

marcodiiorio
Автор

Thank you!  You explain the way it works very well.  I found your GitHub repository; however I don't see the How to parse XML data into a ListView.  I did grab a few of your others though!  Great work & I'm happy to follow you, here & on GitHub!

codingwithjoyk
Автор

Off the bat I can tell that the images won't work correctly because in the source xml the enclosure tag does not put the image url into the content of the tags, it has it set as the url attribute. That might be enough to throw off the parsing enough that you aren't getting any items in your ArrayList. In your log cat what does it say for "Adapter Size = "? I'll download your code later tonight and see if I can't help troubleshoot some.

Zobrombee
Автор

Please help me to use this code with a Wordpress blog, I'm lost on what name wordpress give to the xml file

hamletmendez
Автор

Nice and very clear tutorial. You made my day ;)

Автор

Did that project actually run successfully on your computer? With the images showing up and everything? All I got was a blank page, not even lines for a listview as before. Been troubleshooting it all day, but no luck so far.

davidglynn
Автор

On single item click opens a link via the web browser, how do i open the single list item in a new activity inside the app using  story id?

crazyantoine
visit shbcf.ru