JDOM duplicate element name handling
<p>Say for eg I have an XML like this</p>

<pre><code>    &lt;Containers&gt;
      &lt;Container  ContainerGrossWeight="0.69"  ContainerGrossWeightUOM="lbs" ContainerScm="16757598166153847" TrackingNo="420913119102999949374063023016"&gt;
      &lt;/Container&gt;
    &lt;Container   ContainerGrossWeight="4.84" ContainerGrossWeightUOM="lbs" ContainerScm="16757598166153848" 
    TrackingNo="420913119102999949374063023016"&gt;
      &lt;/Container&gt;
    &lt;/Containers&gt;
</code></pre>

<p>So "Containers" is the parent and it has two children..  and another .. But the attribute values in both  are different.</p>

<p>I use JDOM to read and manipulate the values. If I write the below code I get the attributes of first . My question is how do I access the attributes and values of second ?</p>

<pre><code>Element Containers = rootNode.getChild("Containers")

Element Container = Containers.getChild("Container")

String ContainerSCM = Container.getAttributeValue("ContainerSCM")
</code></pre>

<p>The above code gives me "16757598166153847" as output
how do I get "16757598166153848" as output which is the getAttributeValue of second  Element Containers attribute?</p>
