Writing XML data

by Ludwig » Sat, 20 Sep 2008 01:26:53 GMT


Sponsored Links
 I need to write a file in XML format. There are a couple of parsers
available, but I cannot find anything useful for writing XML.

The task is a long-running process, so creating a DOM, then writing it
at the end would be waste of space, I need a stream-based writer that
adds lines of XML to the document before closing all open elements
when the application exits.

Of course I can do this with simple write statements, but I want to
ensure that I will be creating valid XML.

Any hints?

Ludwig

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Solved: OpenGL; GL11.glDrawTexiOES does not seem to work for Nexus One



I think there are other issues with glDrawTexiOES as I find on the N1
it will not work with negative width or height values, which I believe
it should.

Not sure glFrontFace should affect it either.  Is that in the spec?

Sounds like the OpenGL implementation needs a little tweaking, but I
haven't found any showstoppers so far.

Paul.

2. listitem listener is not being called

hi,

i've tried displaying a simple list using listactivity.
it is working fine but the problem is with the listener.
when i click on ant list item with mouse ,the onListItemClick()
listener is not called..
strangely this is working fine when i click the key-up&key-down keys.


can anybody tell what could hav gone wrong?why is muouse click not
working???

/////////my code goes like this

public class NoteList extends ListActivity{
        List<String> feeds = new ArrayList<String>(10/*messages.size()*/);

        String [] path={"http://10.200.207.85:8080/android_news.xml","http://
10.200.207.85:8080/rss.xml"};
        @Override
        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.notes_list);
        setTitle("RssReader/ListSubScriptions");
          fillList();



    }
        public void fillList()
        {
                feeds.add("Android_news");
                feeds.add("MS-US-Local");
                this.setListAdapter(new ArrayAdapter<String>(this,
R.layout.row,feeds));

        }
        @Override
    protected void onListItemClick(ListView l, View v, int position,
long id) {
        super.onListItemClick(l, v, position, id);
                String data = path[position];
        NoteEditLogic n=new NoteEditLogic(getContentResolver());
        n.save1(null, data);
        finish();

}
thanx in advance

3. nandroid backup & restore error

4. Multiple Instances of Widget

5. get outgoing call details in background

6. SOLVED WTA : Setting GPRS Buat Matrix INDOSAT.. (Juga MMS)

7. android compiling......