Code I am using, working just fine:

------------- snip --------------
                    SAXParserFactory parserFactory = 
SAXParserFactory.newInstance();
                    SAXParser parser = parserFactory.newSAXParser();
                    MyParseHandler handler = new MyParseHandler();
                    URL url = new URL("http://"; + hostname + request );
                    URLConnection connection = url.openConnection();
                    HttpURLConnection httpConnection =
(HttpURLConnection)connection;
                    int responseCode = httpConnection.getResponseCode();
                    if (responseCode == HttpURLConnection.HTTP_OK) {
                        InputStream in = httpConnection.getInputStream();
                        try {
                            parser.parse(in, handler);
                        } catch(org.xml.sax.SAXException e) {
                                Log.v("Parse exception", "MyParseHandler parse 
exception: "
+ e.getMessage());
                                errorMsg = "routeConfig parse exception: " +
e.getMessage();
                        }
------------- snip --------------

On a functional level this does not look that much different from
yours, so the problem must be some place else. Perhaps having to log
in throws you off.
JP


On Jun 21, 6:13 am, Deyan Peev <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> i need Your help:
>
> i need to read a XML output from  server (who needs username and
> password for access)   in my android app. I've made HttpConnection (post
> to the server was no problem..) to connect the server and authenticate.
> Then i read the HttpResponse - it looks like this:
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to