parsing does not working in android
<p>I am parsing a xml from an url.The url is has mobile IMEI no and searchstring based on my application. i put my xml parsing code in android project it does not work. but if i run as separate java program it is working. please help me.</p>

<pre><code>Log.e("rsport-", "function1");
 try{
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  factory.setIgnoringComments(true);
  factory.setCoalescing(true); // Convert CDATA to Text nodes
  factory.setNamespaceAware(false); // No namespaces: this is default
  factory.setValidating(false); // Don't validate DTD: also default
  DocumentBuilder parser = factory.newDocumentBuilder();
  Log.e("rsport-", "function2");
  Document document = parser.parse("http://demo.greatinnovus.com/restingspot/search?userid=xxxxxxxxxxxxxxxx&amp;firstname=a&amp;lastname=a");
  Log.e("rsport-","function3"); 
   NodeList sections = document.getElementsByTagName("Searchdata"); 
     int numSections = sections.getLength();
       for (int i = 0; i &lt; numSections; i++) 
     {
       Element section = (Element) sections.item(i); 
       if(section.hasChildNodes()==true){
           NodeList section1=section.getChildNodes();
              for(int j=0;j&lt;section1.getLength();j++){
                if(section1.item(j).hasChildNodes()==true) {
                    for(int k=0;k&lt;section1.item(j).getChildNodes().getLength();k++)                     
                                 xmlvalue=String.valueOf(section1.item(j).getChildNodes().item(k).getNodeValue()).trim();

                                 arl.add(xmlvalue);
                  }
              }
          }
        }

     }
       } 
   catch(Exception e){}
        System.out.println("id"+id+"       searchdatacount"+searchdatacount);
        System.out.println("---------");
        ListIterator&lt;String&gt; litr = arl.listIterator();
        while (litr.hasNext()) {
            String element = litr.next();
            Log.e("rsport-", "elememt");
        }
</code></pre>

<p>after the <code>Log.e("rsport-", "function2")</code>; does not work.</p>
