Read a file on the web

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Read a file on the web

Postby ajpatl » Sun Apr 04, 2010 11:11 pm

First off this is my first post and I have no idea where to post questions, this seems like the most appropriate area so if its wrong please move it :)

Anyways I would like to know how to read a file that is on the internet for example I want to read this text file:

http://www.w3schools.com/asp/testread.txt

How would i go about doing so, I searched it on the forum and I found some code but it didn't work so I'm guessing it wasn't meant for this purpose.

Thanks.
ajpatl
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Apr 04, 2010 6:06 am

Top

Postby DMacATTACK » Mon Apr 05, 2010 5:18 am

I suggest looking into http request/response methods (not only with android). For Example you can send http requests through command prompt or wget for linux does it at a higher level, and both return an xml file, which can then be parsed for neccessary data. This is the basic process how browsers work.
Knowing this methodology you could then port it to android. If u get what I'm suggesting (http and xml parsing) then its a cinch.

-Dan-
User avatar
DMacATTACK
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Thu Dec 31, 2009 6:31 pm
Location: Canada

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 6 guests