Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
/************************************************************************************ * XmlFileCreator.java * Author: Francesco Noya (francesco.noya AT studenti.unimi.it) * * This activity shows how to write an xml file into the SD card using * org.xmlpull.v1.XmlSerializer * * For more informations check these links: * * http://developer.android.com/reference/ ... lizer.html * * http://www.ibm.com/developerworks/opens ... tml#list11 * * ************************************************************************************/ package it.noya.test; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import org.xmlpull.v1.XmlSerializer; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.util.Xml; import android.widget.TextView; public class XmlFileCreator extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //create a new file called "new.xml" in the SD card File newxmlfile = new File(Environment.getExternalStorageDirectory()+"/new.xml"); try{ newxmlfile.createNewFile(); }catch(IOException e){ Log.e("IOException", "exception in createNewFile() method"); } //we have to bind the new file with a FileOutputStream FileOutputStream fileos = null; try{ fileos = new FileOutputStream(newxmlfile); }catch(FileNotFoundException e){ Log.e("FileNotFoundException", "can't create FileOutputStream"); } //we create a XmlSerializer in order to write xml data XmlSerializer serializer = Xml.newSerializer(); try { //we set the FileOutputStream as output for the serializer, using UTF-8 encoding serializer.setOutput(fileos, "UTF-8"); //Write serializer.attribute(null, "attribute", "value"); serializer.endTag(null, "child2"); serializer.startTag(null, "child3"); //write some text inside serializer.text("some text inside child3"); serializer.endTag(null, "child3"); serializer.endTag(null, "root"); serializer.endDocument(); //write xml data into the FileOutputStream serializer.flush(); //finally we close the file stream fileos.close(); TextView tv = (TextView)this.findViewById(R.id.result); tv.setText("file has been created on SD card"); } catch (Exception e) { Log.e("Exception","error occurred while creating xml file"); } } }