Why i am getting SAXException in the below given code
<p>Why i am getting SAXException in the below given code. The XML file handler and logcat is given below. Is there any issue with   the  handler. Is this error because of the XML which is shown below.</p>

<p>Response:</p>

<pre><code>1    
2   &lt;xml version="1.0"&gt;
3   &lt;xml&gt;
4   &lt;opcode&gt;
5       &lt;tsip&gt;65.99.254.23:3939&lt;/tsip&gt; | 
6       &lt;ssip&gt;207.210.233.180:5060&lt;/ssip&gt; |
7       &lt;brand&gt;iVoip Dialer&lt;/brand&gt; |
8       &lt;balance&gt;http://207.210.233.180:8888/cdr/get_balance.php?pin=&lt;/balance&gt; |
9       &lt;rates&gt;www.democall.com/ratelink&lt;/rates&gt; |
10      &lt;domain&gt;www.sabavoip.com&lt;/domain&gt; |
11      &lt;operator&gt;0786&lt;/operator&gt; |
12      &lt;active&gt;Active&lt;/active&gt;
13  &lt;/opcode&gt;
14  &lt;/xml&gt;
15
16
</code></pre>

<p>Code:</p>

<pre><code>try {
            HttpClient client = new DefaultHttpClient();
            HttpGet method= new HttpGet();
            method.setURI(new URI(AppConstatnt.OPCODE_URL+code));

            HttpResponse response=client.execute(method);           
            HttpEntity entity=response.getEntity();         
            InputStream stream=entity.getContent();

            Log.e("b4 execute in login","aditya");

            SAXParserFactory spf = SAXParserFactory.newInstance(); 
            SAXParser sp = spf.newSAXParser(); 
            XMLReader xr = sp.getXMLReader(); 
            OPCodeHandler myopcodeHandler = new OPCodeHandler();
            xr.setContentHandler(myopcodeHandler); 

            xr.parse(new InputSource(stream)); 
            objsitelist = myopcodeHandler.getSiteList();
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ParserConfigurationException e) {
            e.printStackTrace();
        } catch (SAXException e) {
            e.printStackTrace();
        }
</code></pre>

<p>Handler:</p>

<pre><code>public class OPCodeHandler extends DefaultHandler {

    boolean currentElement = false;
    String currentValue = "";
    SitesList siteobject;

    public SitesList getSiteList() {
        return siteobject;
    }

    public void setSiteList(SitesList objsite) {
        siteobject = objsite;
    }

    @Override
    public void startElement(String uri, String localName, String qName,
            Attributes attributes) throws SAXException {
        currentElement = true;
        currentValue = "";
        if (localName.equalsIgnoreCase("opcode")) {
            siteobject = new SitesList();
        }
    }

    @Override
    public void characters(char[] ch, int start, int length)
            throws SAXException {

        if (currentElement) {
            currentValue = new String(ch, start, length);
            currentElement = false;
        }
    }

    @Override
    public void endElement(String uri, String localName, String qName)
            throws SAXException {
        currentElement = false;
        if (localName.equalsIgnoreCase("tsip")) {
            siteobject.setTsip(currentValue);
        }
        if (localName.equalsIgnoreCase("ssip")) {
            siteobject.setSsip(currentValue);
        }
        if (localName.equalsIgnoreCase("brand")) {
            siteobject.setBrand(currentValue);
        }
        if (localName.equalsIgnoreCase("balance")) {
            siteobject.setBalance(currentValue);
        }
        if (localName.equalsIgnoreCase("rates")) {
            siteobject.setRates(currentValue);
        }

        if (localName.equalsIgnoreCase("domain")) {
            siteobject.setDomain(currentValue);
        }
        if (localName.equalsIgnoreCase("operator")) {
            siteobject.setOperator(currentValue);
        }
        if (localName.equalsIgnoreCase("active")) {
            siteobject.setActive(currentValue);
        }
        if (localName.equalsIgnoreCase("opcode")) {
            setSiteList(siteobject);
        }

    }

}
</code></pre>

<p>Logcat:</p>

<pre><code>org.apache.harmony.xml.ExpatParser$ParseException: At line 16, column 0: no element found
org.apache.harmony.xml.ExpatParser.finish(ExpatParser.java:550)
org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:480)

org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318)

org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275)

com.ievatech.webservice.AppRequestHandler.opCodeRequest(AppRequestHandler.java:53)

com.sample.test.SampleAppActivity$Communicator.doInBackground(SampleAppActivity.java:131)

com.sample.test.SampleAppActivity$Communicator.doInBackground(SampleAppActivity.java:1)
android.os.AsyncTask$2.call(AsyncTask.java:185)
09-07 19:58:36.439: W/System.err(9731):     
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
java.util.concurrent.FutureTask.run(FutureTask.java:138)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)

java.lang.Thread.run(Thread.java:1019)
</code></pre>
