[android-beginners] Re: hot to view page source?

2009-09-08 Thread murali raju
Thanks a lot.

On Tue, Sep 8, 2009 at 1:48 PM, Alok Kulkarni  wrote:

> 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  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  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"  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
-~--~~~~--~~--~--~---



[android-beginners] Re: hot to view page source?

2009-09-08 Thread Alok Kulkarni
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  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  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 > > 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"  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
-~--~~~~--~~--~--~---



[android-beginners] Re: hot to view page source?

2009-09-08 Thread Alok Kulkarni
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  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 
> 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"  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
-~--~~~~--~~--~--~---



[android-beginners] Re: hot to view page source?

2009-09-07 Thread murali raju
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 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"  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
-~--~~~~--~~--~--~---



[android-beginners] Re: hot to view page source?

2009-09-07 Thread Justin Anderson
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"  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
-~--~~~~--~~--~--~---