title: List child nodes of element XSLT
body: <p>So I want to list all the child nodes with name and text of Specs node.</p>
  
  <pre><code>&lt;Item-Request model="MZ-7TE1T0BW" Supplier-Code="TOMSAM1TB"&gt;
      &lt;DisplayItem&gt;
          &lt;Item href="SAM1TBMZ7TE1T0BW.jpg" model="MZ-7TE1T0BW"&gt;
              &lt;Name&gt;Samsung SSD MZ-7TE1T0BW 1 TB 2.5 inch&lt;/Name&gt;
              &lt;Price&gt;630.99&lt;/Price&gt;
              &lt;SupplierCode&gt;TOMSAM1TB&lt;/SupplierCode&gt;
              &lt;Description/&gt;
              &lt;Specs&gt;
                  &lt;Capacity&gt;1 TB&lt;/Capacity&gt;
                  &lt;Reading&gt;540 MB/s&lt;/Reading&gt;
                  &lt;Writing&gt;520 MB/s&lt;/Writing&gt;
                  &lt;FormFactor&gt;2.5 "&lt;/FormFactor&gt;
                  &lt;Connecor&gt;Sata III&lt;/Connecor&gt;
                  &lt;Size&gt;
                      &lt;Width&gt;70 mm&lt;/Width&gt;
                      &lt;Height&gt;7 mm&lt;/Height&gt;
                  &lt;/Size&gt;
                  &lt;Weight&gt;53 g&lt;/Weight&gt;
              &lt;/Specs&gt;
              &lt;Supplier&gt;TOM001&lt;/Supplier&gt;
              &lt;SupplierName&gt;Tom PC Hardware&lt;/SupplierName&gt;
              &lt;Manufacturer&gt;Samsung&lt;/Manufacturer&gt;
          &lt;/Item&gt;
      &lt;/DisplayItem&gt;
  &lt;/Item-Request&gt;
  </code></pre>
  
  <p>I cannot do this hard-coded as these are not values that I have readily available and can be added or removed. So I need something that could dynamically list them.</p>
  
  <p>So far what I've been able to do is</p>
  
  <pre><code>&lt;xsl:for-each select="DisplayItem/Item/Specs"&gt;
                                  &lt;xsl:for-each select="node()"&gt;
                                      &lt;xsl:value-of select="."/&gt;
                                      &lt;br/&gt;
                                  &lt;/xsl:for-each&gt;
                              &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>The above lists the values on a separate line now I need to be able to display the element name.</p>