Android org.w3c.dom.Document Build slow for large data
<p>Building an App that takes a zipped xml string from a webservice and expands the string into a list of widgets.
For most of the widget types, the code is OK but one type is a large list. 7000 items. This data brings the docBuilder parse statement below to its knees. It takes minutes to make the doc.
With this data incoming data array 'zipData' has a size of 896,000. Even the Eclipse debugger times out when you mouse over the String variables 'xml' and 'loadable'.</p>

<p>It there a better way to deal with the unpacked data. Given that it is an XML fragment with a lot of Widget nodes. I have no control over the list size.
To clarify each widget is in a common type of Node. i.e.  It is the number of attributes and their names that differentiate the widget types. The Webservice response tells you what sort of widget you are getting.</p>

<pre><code>private ArrayList&lt;GenCommItem&gt; MakeList(byte[] zipData,com.example.wstest3.GenCommHandler.ClassType classType) throws IOException, ParserConfigurationException{


    try {

         ArrayList&lt;GenCommItem&gt; list = new ArrayList&lt;GenCommItem&gt;();
         String xml = new String(zipData);
         String loadable = "&lt;root&gt;" + xml + "&lt;/root&gt;";
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         org.w3c.dom.Document d2 = docBuilder.parse(new InputSource(new StringReader(loadable)));
</code></pre>
