See this http://senior.ceng.metu.edu.tr/2009/praeda/2009/01/11/a-simple-restful-client-at-android/
On Tue, Sep 8, 2009 at 1:47 PM, Alok Kulkarni <[email protected]> wrote: > I have the following code written in java (J2SE) > It reads the source of the webpage .Convert it to that req by Android. > Maybe u can directly use it. > > > URL url = new URL(stringURL); > > HttpURLConnection httpConnection = > (HttpURLConnection)url.openConnection(); > httpConnection.setRequestMethod("GET"); > httpConnection.connect(); > InputStream inputStream = httpConnection.getInputStream(); > StringBuffer htmlString = new StringBuffer(); > int ch; > do { > ch = inputStream.read(); > htmlString.append((char)ch); > } while(ch != -1); > String toParse = htmlString.toString(); > Thanks, > Alok. > > > On Tue, Sep 8, 2009 at 11:47 AM, murali raju <[email protected]> wrote: > >> In my application i need to parse through the html file, to get the URLs. >> so Is there any other way I can view the page source? or any other >> approach? >> >> >> On Tue, Sep 8, 2009 at 11:39 AM, Justin Anderson <[email protected] >> > wrote: >> >>> The view-source: option is a feature that is part of the program >>> (browser) that you happen to be using... it is not part of a standard >>> protocol or anything. >>> >>> It sounds like that feature is not programmed into the browser and treats >>> that command as any other url... >>> >>> On Sep 7, 2009 9:55 PM, "mmkr" <[email protected]> wrote: >>> >>> >>> Hai, >>> >>> In browsers when I type view-source: before any address it gives me >>> the page source. But i am not able to do it in android. It gives me >>> "web page not available" . Can any one please tell me why it is giving >>> that and any other way for me to view the page source in android? >>> >>> One more doubt is what exactly is "@hide", even if I commented >>> it( /** @hide */) it is having some meaning( it is not visible in >>> another classes ). When I deleted it its working fine, it is visible. >>> what is the reason? >>> >>> Thanks. >>> >>> >>> >>> >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

