title: Issue with parsing big xml files in Android
body: <p>Are there any efficient XML parsers for Android to parse large XML files efficiently. The XML document has HTML text inside an element without CDATA.  </p>
  
  <p>Currently I am using SAX Parser in Android. I am appending the Strings when it breaks at HTML characters, but it takes up to 4-5 minutes to parse the entire file. Once I start parsing the emulator is aborting. Log cat o/p is shown as below...</p>
  
  <p>My current scenario:</p>
  
  <ol>
  <li>11 MB XML file on the SD card</li>
  <li>File contains HTML text for some elements in XML and it is not enclosed in CDATA</li>
  <li>Emulator aborting after 2-3 minutes</li>
  </ol>
  
  <p>My queries are:</p>
  
  <ol>
  <li>Are there any practical limitations in Android to parse large files</li>
  <li>Should I use a different parser which is more efficient for such files</li>
  </ol>
  
  <blockquote>
    <p>01-20 12:44:22.133: I/dalvikvm(19715): DALVIK THREADS:<br>
    01-20 12:44:22.143: I/dalvikvm(19715): "main" prio=5 tid=1 TIMED_WAIT<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   | group="main" sCount=1 dsCount=0 s=N obj=0x4001d8e0 self=0xccb0<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   | sysTid=19715 nice=0 sched=0/0 cgrp=default handle=-1345026008<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   | schedstat=( 1890827936 745978586 1231 )<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at java.lang.Object.wait(Native Method)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   - waiting on &lt;0x44e7c158> (a android.os.MessageQueue)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at java.lang.Object.wait(Object.java:326)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at android.os.MessageQueue.next(MessageQueue.java:142)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at android.os.Looper.loop(Looper.java:110)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at android.app.ActivityThread.main(ActivityThread.java:4627)<br>
    01-20 12:44:22.143: I/dalvikvm(19715):   at java.lang.reflect.Method.invokeNative(Native Method)<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   at java.lang.reflect.Method.invoke(Method.java:521)<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   at dalvik.system.NativeStart.main(Native Method)<br>
    01-20 12:44:22.152: I/dalvikvm(19715): "AsyncTask #1" prio=5 tid=7 RUNNABLE<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   | group="main" sCount=0 dsCount=0 s=N obj=0x44e98170 self=0x116238<br>
    01-20 12:44:22.152: I/dalvikvm(19715):   | sysTid=19721 nice=0 sched=0/0 cgrp=default handle=1139576<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   | schedstat=( 30192250334 11754013998 4287 )<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:~89)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at java.lang.StringBuilder.(StringBuilder.java:96)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at com.app.sampleApp.ExampleHandler.characters(ExampleHandler.java:346)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatParser.text(ExpatParser.java:167)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatParser.append(Native Method)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:521)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:482)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:320)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:277)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at com.app.sampleApp.SplashScreen.parsing(SplashScreen.java:95)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at com.app.sampleApp.SplashScreen$FetchDataFromServer.doInBackground(SplashScreen.java:66)<br>
    01-20 12:44:22.162: I/dalvikvm(19715):   at com.app.sampleApp.SplashScreen$FetchDataFromServer.doInBackground(SplashScreen.java:1)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at android.os.AsyncTask$2.call(AsyncTask.java:185)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at java.util.concurrent.FutureTask.run(FutureTask.java:137)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at java.lang.Thread.run(Thread.java:1096)<br>
    01-20 12:44:22.173: I/dalvikvm(19715): "Binder Thread #2" prio=5 tid=6 NATIVE<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   | group="main" sCount=1 dsCount=0 s=N obj=0x44e7adc0 self=0x136b18<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   | sysTid=19720 nice=0 sched=0/0 cgrp=default handle=1277072<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   | schedstat=( 4379710 8487993 4 )<br>
    01-20 12:44:22.173: I/dalvikvm(19715):   at dalvik.system.NativeStart.run(Native Method)<br>
    01-20 12:44:22.183: I/dalvikvm(19715): "Binder Thread #1" prio=5 tid=5 NATIVE<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | group="main" sCount=1 dsCount=0 s=N obj=0x44e77130 self=0x132868<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | sysTid=19719 nice=0 sched=0/0 cgrp=default handle=1271608<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | schedstat=( 9087362 4814877 5 )<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   at dalvik.system.NativeStart.run(Native Method)<br>
    01-20 12:44:22.183: I/dalvikvm(19715): "JDWP" daemon prio=5 tid=4 VMWAIT<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | group="system" sCount=1 dsCount=0 s=N obj=0x44e752a0 self=0x1245a0<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | sysTid=19718 nice=0 sched=0/0 cgrp=default handle=1178336<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | schedstat=( 13148782 23404684 16 )<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   at dalvik.system.NativeStart.run(Native Method)<br>
    01-20 12:44:22.183: I/dalvikvm(19715): "Signal Catcher" daemon prio=5 tid=3 VMWAIT<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | group="system" sCount=1 dsCount=0 s=N obj=0x44e751e8 self=0x120298<br>
    01-20 12:44:22.183: I/dalvikvm(19715):   | sysTid=19717 nice=0 sched=0/0 cgrp=default handle=1275872<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   | schedstat=( 650295 9179530 2 )<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   at dalvik.system.NativeStart.run(Native Method)<br>
    01-20 12:44:22.192: I/dalvikvm(19715): "HeapWorker" daemon prio=5 tid=2 VMWAIT<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   | group="system" sCount=1 dsCount=0 s=N obj=0x438b8d00 self=0x12efc0<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   | sysTid=19716 nice=0 sched=0/0 cgrp=default handle=1249312<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   | schedstat=( 92741950 1647777523 865 )<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:~48)<br>
    01-20 12:44:22.192: I/dalvikvm(19715):   at dalvik.system.NativeStart.run(Native Method)  </p>
  </blockquote>