Hello!
I'm trying to parse a a zip-compressed-xml file from net:

TextView tv = new TextView(this);
String  zipLocation = "http://www.location.de/xml.zip";;
URL url = new URL(xmlLocation);
URLConnection URLconnection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) URLconnection;
InputStream in = httpConnection.getInputStream();
ZipInputStream zipin = new ZipInputStream(in);
tv.setText("XM-FileName: " + zipin.getNextEntry().toString());
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db;
        try {
             db = dbf.newDocumentBuilder();
             doc=null;
             doc = db.parse(in);
             ....
        }catch( ...

It works corretly as an normal Java Application, but running as an
Android Application it prints the correct  "XML-FileName: Example",
but than i get an SaxParseException: "org.xml.sax.SAXParseException:
Unexpected end of document" on line db.parse(in) .Can anyone help me?

--~--~---------~--~----~------------~-------~--~----~
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]
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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to