Doc xml Parser android local xml file reading
<p>I have one local xml file. I am storing here : res/xml/myxml.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;list&gt;
&lt;lists&gt;
    &lt;tag&gt;College Website&lt;/tag&gt;
    &lt;value&gt;http://www.nitk.ac.in/&lt;/value&gt;
    &lt;lastupdate&gt;04-07-2012&lt;/lastupdate&gt;
&lt;/lists&gt;
&lt;lists&gt;
    &lt;tag&gt;College Images&lt;/tag&gt;
    &lt;value&gt;http://studentsworld.nitk.ac.in/index.php?q=convocation.html&lt;/value&gt;
    &lt;lastupdate&gt;25-9-2011&lt;/lastupdate&gt;
&lt;/lists&gt;
&lt;/list&gt;
</code></pre>

<p>I have doc for loop. but how to connect local xml file in doc parser. i don't want url model, i want to a local xml file. </p>

<pre><code>for (int i = 0; i &lt; nodeList.getLength(); i++) {

            Node node = nodeList.item(i);

            tag[i] = new TextView(this);
            value[i] = new TextView(this);
            lastupdate[i] = new TextView(this);

            Element fstElmnt = (Element) node;
            NodeList nameList = fstElmnt.getElementsByTagName("tag");
            Element nameElement = (Element) nameList.item(0);
            nameList = nameElement.getChildNodes();
            tag[i].setText("tag = " + ((Node) nameList.item(0)).getNodeValue());

            NodeList websiteList = fstElmnt.getElementsByTagName("value");
            Element websiteElement = (Element) websiteList.item(0);
            websiteList = websiteElement.getChildNodes();
            value[i].setText("value = " + ((Node) websiteList.item(0)).getNodeValue());

            NodeList lastupdateList = fstElmnt.getElementsByTagName("tag");
            Element lastupdateElement = (Element) lastupdateList.item(0);
            lastupdateList = lastupdateElement.getChildNodes();
            lastupdate[i].setText("lastupdate = " + ((Node) lastupdateList.item(0)).getNodeValue());



            layout.addView(tag[i]);
            layout.addView(value[i]);
            layout.addView(lastupdate[i]);

        }
    } catch (Exception e) {
        System.out.println("XML Pasing Excpetion = " + e);
    }
</code></pre>

<p>I have main.xml file
please send me a code</p>
