Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to append data to xml content in Android
  2. <words>
  3. hdhsd
  4. </words>
  5.        
  6. OutputStreamWriter out=new OutputStreamWriter(openFileOutput("keywords.xml", MODE_APPEND));
  7.     out.write("hello");
  8.    out.close();
  9.        
  10. os=getApplicationContext().openFileOutput("keywords.xml", Context.MODE_WORLD_WRITEABLE);
  11. os.write("<words><word>moha</word></words>".getBytes());
  12. os.close();