How to parse same name tag in Android XML?
<p>How can I parse the same name tag in XML?</p>

<p>Here's a segment of the XML file:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;item&gt;  
    &lt;RecipeDescription&gt;A much requested chicken recipe! Easy to double for a large group. Delicious&lt;/RecipeDescription&gt;

    &lt;RecipeIngredientsName&gt;1 tablespoon cornstarch&lt;/RecipeIngredientsName&gt;
    &lt;RecipeIngredientsName&gt;1 tablespoon cold water&lt;/RecipeIngredientsName&gt;
    &lt;RecipeIngredientsName&gt;1/2 cup white sugar&lt;/RecipeIngredientsName&gt;
&lt;/item&gt;
</code></pre>

<p>My XML Parser Class:</p>

<pre><code>private void ProcessXml(Document data) {
    if (data != null) {
        recipesItems =new ArrayList&lt;&gt;();
        Element root = data.getDocumentElement();
        Node channel = root.getChildNodes().item(1);
        NodeList items = channel.getChildNodes();

        for (int i = 0; i &lt; items.getLength(); i++) {
            Node cureentchild = items.item(i);

            if (cureentchild.getNodeName().equalsIgnoreCase("item")) {
                RecipesItem item = new RecipesItem();
                NodeList itemchilds = cureentchild.getChildNodes();

                for (int j = 0; j &lt; itemchilds.getLength(); j++) {
                    Node cureent = itemchilds.item(j);
                    if (cureent.getNodeName().equalsIgnoreCase("RecipeDescription")) {
                        item.setRecipeDescription(cureent.getTextContent());
                    }else if (cureent.getNodeName().equalsIgnoreCase("RecipeIngredientsName")){
                        item.setRecipeIngredientsName(cureent.getTextContent());
                    }

                }
                recipesItems.add(item);
            }
        }
    }
}

public Document Getdata() {
    try {
        url = new URL(address);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("GET");
        InputStream inputStream = connection.getInputStream();
        DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = builderFactory.newDocumentBuilder();
        Document xmlDoc = builder.parse(inputStream);
        return xmlDoc;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
</code></pre>

<p>But the problem is with the same <code>RecipeIngredientsName</code> names in the item. How can I get these values?
Thank you so much.</p>