On Sep 6, 10:28 am, Jhew SAN <[email protected]> wrote: > File newxmlfile = new File("/sdcard/sss.xml"); > try{ > newxmlfile.createNewFile(); > }catch(IOException e){ > Log.e("IOException", "exception in createNewFile() method"); > } > FileOutputStream fileos = null; > try{ > fileos = new FileOutputStream(newxmlfile); > }catch(FileNotFoundException e){ > Log.e("FileNotFoundException", "can't create > FileOutputStream"); > } > XmlSerializer serializer = Xml.newSerializer(); > try { > serializer.setOutput(fileos, "UTF-8"); > serializer.startDocument(null, Boolean.valueOf(true)); > > serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", > true); > serializer.startTag(null, "root"); > serializer.startTag(null, "data"); > serializer.startTag(null, "city"); > serializer.startTag(null, data.getCity()); > serializer.endTag(null, data.getCity()); > serializer.endTag(null, "city"); > serializer.startTag(null, "temperature"); > serializer.attribute(null, "temperature", > data.getCurrentConditionData().getTemp_c()); > serializer.endTag(null, "temperature"); > serializer.endTag(null, "data"); > serializer.endTag(null, "root"); > serializer.endDocument(); > serializer.flush(); > fileos.close(); > }catch(Exception e) > { > Log.e("Exception","error occurred while creating xml file"); > }
...and your problem is ...? pskink -- 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

