Android - Reading XML issues
<p>I've got an app that consumes a .NET web service which returns an XML string of data.  I'm trying to read this XML and insert it into the local SQLite DB but I'm having some trouble.  Here's a sample of the xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
&lt;string xmlns="RemoteWebService"&gt;&lt;OpenIssues&gt; &lt;Table&gt; &lt;IssueID&gt;15351&lt;/IssueID&gt;   &lt;IssueSummary&gt;Computer keeps crashing. This continues to be a problem&lt;/IssueSummary&gt; &lt;LocationName&gt;West Side&lt;/LocationName&gt; &lt;Status&gt;WIP&lt;/Status&gt; &lt;CustomerID&gt;89755&lt;/CustomerID&gt; &lt;CustomerName&gt;West Side Computers&lt;/CustomerName&gt; &lt;CustomerShortName&gt;WSC&lt;/CustomerShortName&gt; &lt;Notes /&gt; &lt;STATUS1&gt;Work In Progress&lt;/STATUS1&gt; &lt;SubmittedBy&gt;WSC - Tom Johns&lt;/SubmittedBy&gt; &lt;EQ_Replaced&gt;true&lt;/EQ_Replaced&gt;&lt;/Table&gt; &lt;/OpenIssues&gt;&lt;/string&gt; 
</code></pre>

<p>Using DOM, I'm trying to parse the results like so:</p>

<pre><code>private void GetLatestData(String response) throws ParserConfigurationException, SAXException, IOException{

    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(new InputSource(new StringReader(response)));

    //Normalize the document.
    doc.getDocumentElement().normalize();

    //Get Root Node.
    NodeList nodeList = doc.getElementsByTagName("Table");
    Node node = nodeList.item(0);

    //Get Child Nodes.
    for(int i = 0; i &lt; node.getChildNodes().getLength(); i++){
        IssueInfo issue = new IssueInfo();
        Node tempNode = node.getChildNodes().item(i);

        if(tempNode.getNodeName().equalsIgnoreCase("IssueID")){
            issue.setIssueNumber(Long.parseLong(tempNode.getTextContent()));
        }

        if(tempNode.getNodeName().equalsIgnoreCase("IssueSummary")){
            issue.setIssueNumber(Long.parseLong(tempNode.getTextContent()));
        }               

        if(issue.getIssueNumber() &gt; 0 &amp;&amp; issue.getIssueSummary() != null){
            creator = new IssueInfoCreator(this, DBVersion);
            creator.open();
            creator.InsertIssue(issue.getIssueNumber(), DateFormat.getDateInstance().format(new Date()), issue.getIssueSummary());
            creator.close();
        }
    }
}
</code></pre>

<p>When I run it through the debugger, it gets "IssueID" just fine but how can I get it to pickup the next node "IssueSummary" right after that so I can insert the data at once?  It seems like I need another loop somewhere, just not too sure where though.</p>
