title: Parse XML from local file instead from URL
body: <p>so after your guides i changed the code to this but the app just hangs...
  whats the next step from here? getXML is called from </p>
  
  <pre><code>Document xml = XMLemailF.getXML();
  </code></pre>
  
  <p>.</p>
  
  <pre><code>    public static Document getXML(){     
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  
      // get a document builder
      DocumentBuilder db = null;
      try {
          db = dbf.newDocumentBuilder();
      } catch (ParserConfigurationException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
      //parse using builder to get DOM representation of the XML file
      Document doc = null;
      try {
          doc = db.parse("/xxxxxx/res/xml/email.xml");
      } catch (SAXException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
      return doc;
  
  }
  </code></pre>
  
  <p>this is called </p>
  
  <pre><code>public static int numResults(Document doc){     
      Node results = doc.getDocumentElement();
      int res = -1;
  
      try{
          res = Integer.valueOf(results.getAttributes().getNamedItem("count").getNodeValue());
      }catch(Exception e ){
          res = -1;
      }
  
      return res;
  }
  </code></pre>
  
  <p>through this</p>
  
  <pre><code>...
  Document xml = XMLemailF.getXML();
  
      int numResults = XMLemailF.numResults(xml);
  
      if((numResults &lt;= 0)){
          Toast.makeText(contactus_email.this, "No results found", Toast.LENGTH_LONG).show();  
          finish();
      }
  
      NodeList nodes = xml.getElementsByTagName("result");
  
      for (int i = 0; i &lt; nodes.getLength(); i++) {                           
          HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();    
  
          Element e = (Element)nodes.item(i);
          map.put("email", XMLemailF.getValue(e, "email"));
          map.put("line1", XMLemailF.getValue(e, "line1"));
          mylist.add(map);
  ...
  </code></pre>
  
  <p>Any ideas?</p>