mardi 4 août 2015

Max size of xml for Dom parser

I´m making android app. As ussual i´m storing my data in xml file(i´m used to do that), I have DOM parser to get these data into my app. Now i have this problem, i was working only with partial xml and everything was fine. When i filled my xml completely (its about 6000 rows and 375kb size, i will probably need even more) i´m getting this error:

08-03 17:01:36.429    3866-3866/com.example.blackess.smstestas E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NullPointerException
        at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2476)
        at android.app.ActivityThread.access$1800(ActivityThread.java:117)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:952)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:130)
        at android.app.ActivityThread.main(ActivityThread.java:3687)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:507)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
        at dalvik.system.NativeStart.main(Native Method)

I thought that i have some bad value or something wrong in my xml, but after i searched for that problem i find out that when i have xml under 5000 rows my program is working but if i add more even tested data my program will crash.

What could be that problem or how can i fix it?

Edit: Was reading this Maximum size when parsing XML with DOM too, thought with my 375kb i ´m in limit.

Aucun commentaire:

Enregistrer un commentaire