title: How to get the values from a xml using org.w3c.dom.Document;
body: <p>I am new to xml document. I need the above xml to be extracted and put it in the collection of array.</p>
  
  <pre><code>          &lt;billingOrderSummary&gt;
                 &lt;Order OrderNo="1"&gt;
               &lt;Name&gt;Teleflora's Fall in Love - Premium&lt;/Name&gt;
              &lt;Img&gt;/Images/products/SW0_372709.jpg&lt;/Img&gt;
                &lt;EditItem&gt;detail_id=32734269&amp;amp;frompage=payment&amp;amp;checkoutflag=2&lt;/EditItem&gt;
              &lt;DeleteItem&gt;ReloadOrderdetails(32734269)&lt;/DeleteItem&gt;
              &lt;Item&gt;
                 &lt;Name&gt;price&lt;/Name&gt;
                 &lt;Value&gt;Â $59.95&lt;/Value&gt;
              &lt;/Item&gt;
              &lt;Item&gt;
               &lt;Name&gt;Service Fee:&lt;/Name&gt;
               &lt;Value&gt;Â $10.00&lt;/Value&gt;
              &lt;/Item&gt;
  
               &lt;Item&gt;
                 &lt;Name&gt;deliver on 8/31/2013 to&lt;/Name&gt;
                  &lt;Value&gt;RichardÂ Timbo's Test Store&lt;/Value&gt;
                  &lt;Value&gt;1 Main StÂ &amp;#13;
                       San Jose, CA10126&amp;#13;
                        United States&lt;/Value&gt;
                   &lt;Value&gt;978-978-9789&lt;/Value&gt;
                   &lt;/Item&gt;
                  &lt;Item&gt;
                     &lt;Name&gt;card type&lt;/Name&gt;
                      &lt;Value&gt;Father's Day&lt;/Value&gt;
                   &lt;/Item&gt;
  
                   &lt;Item&gt;
                     &lt;Name&gt;message:&lt;/Name&gt;
                      &lt;Value&gt;gtreg&lt;/Value&gt;
                     &lt;Value&gt;gfdg&lt;/Value&gt;
                    &lt;/Item&gt;
               &lt;/Order&gt;
          &lt;/billingOrderSummary&gt;
  </code></pre>
  
  <p>This is the code I have tried.</p>
  
  <pre><code>                NodeList nodeList = gotoBillingPage.getElementsByTagName('Order');
          print 'nodeList'+ nodeList
          for (int temp = 0; temp &lt; nodeList.getLength(); temp++) {
  
                     Node nNode = nodeList.item(temp);
  
                     System.out.println("\nCurrent Element :" + nNode.getNodeName());
  
                     if (nNode.getNodeType() == Node.ELEMENT_NODE) {
  
                         Element eElement = (Element) nNode;
  
                         System.out.println("Staff id : " + eElement.getAttribute("OrderNo"));
  
                         System.out.println("First Name : " + eElement.getElementsByTagName("Item").item(0).getTextContent());
  
                         int item = eElement.getElementsByTagName("Item").getLength();
  </code></pre>
  
  <p>Here I do know to extract the childs of each .</p>
  
  <p>Note: Here in the last  I have one  child and two  child.</p>
  
  <p>I do know how to extract those value as well.</p>
  
  <p>Can any one help me.</p>