English 中文(简体)
and 任务区
原标题:android AsyncTask xml parsing

i 试图在AsyncTask复制一份大型Xml文件。 Feinstaubative开始活动,但只见黑色屏幕,然后从一开始其他活动的地点返回RSSReaderActative。

记录:

DEBUG/SntpClient(58): request time failed: java.net.SocketException: Address family not supported by protocol
WARN/KeyCharacterMap(623): No keyboard for id 0
WARN/KeyCharacterMap(623): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
INFO/ActivityManager(58): Starting activity: Intent { cmp=de.test.testapp/.FeinstaubActivity }
DEBUG/AndroidRuntime(623): Shutting down VM
WARN/dalvikvm(623): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
WARN/dalvikvm(623): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
INFO/Process(623): Sending signal. PID: 623 SIG: 9
INFO/ActivityManager(58): Process de.test.testapp (pid 623) has died.
INFO/WindowManager(58): WIN DEATH: Window{4402be18 AtchDlg:de.test.testapp/de.test.testapp.RSSReaderActivity paused=false}
INFO/WindowManager(58): WIN DEATH: Window{4400dd68 de.test.testapp/de.test.testapp.RSSReaderActivity paused=false}
INFO/ActivityManager(58): Start proc de.test.testapp for activity de.test.testapp/.RSSReaderActivity: pid=631 uid=10035 gids={3003}
DEBUG/dalvikvm(32): GC_EXPLICIT freed 299 objects / 11488 bytes in 162ms
INFO/UsageStats(58): Unexpected resume of de.test.testapp while already resumed in de.test.testapp
DEBUG/dalvikvm(32): GC_EXPLICIT freed 57 objects / 2440 bytes in 138ms
INFO/ActivityManager(58): Displayed activity de.test.testapp/.RSSReaderActivity: 411 ms (total 532 ms)
DEBUG/dalvikvm(32): GC_EXPLICIT freed 2 objects / 48 bytes in 126ms
DEBUG/dalvikvm(631): GC_FOR_MALLOC freed 3294 objects / 461928 bytes in 72ms
DEBUG/dalvikvm(631): GC_FOR_MALLOC freed 2750 objects / 557024 bytes in 59ms
DEBUG/dalvikvm(631): GC_FOR_MALLOC freed 2786 objects / 506288 bytes in 60ms
WARN/InputManagerService(58): Got RemoteException sending setActive(false) notification to pid 623 uid 10035

法典

    Document document = null;

    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.feinstaub);
            document = (Doxument) new ParseXMLFile().execute();
    }

    private class ParseXMLFile extends AsyncTask<Integer, Integer, Document>{

    @Override
    protected Document doInBackground(Integer... params) {
        Document parsedXML = null;
        try {
            parsedXML = builder.parse(getApplicationContext().getResources().openRawResource(R.raw.finedust));
        } catch (NotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (SAXException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return parsedXML;
    }

}

Regards float

最佳回答
问题回答

暂无回答




相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签