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 <manutd...@gmail.com> 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 
> <janderson....@gmail.com>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" <manutd...@gmail.com> 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 android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to