So I want to list all the child nodes with name and text of Specs node.
<Item-Request model="MZ-7TE1T0BW" Supplier-Code="TOMSAM1TB">
<DisplayItem>
<Item href="SAM1TBMZ7TE1T0BW.jpg" model="MZ-7TE1T0BW">
<Name>Samsung SSD MZ-7TE1T0BW 1 TB 2.5 inch</Name>
<Price>630.99</Price>
<SupplierCode>TOMSAM1TB</SupplierCode>
<Description/>
<Specs>
<Capacity>1 TB</Capacity>
<Reading>540 MB/s</Reading>
<Writing>520 MB/s</Writing>
<FormFactor>2.5 "</FormFactor>
<Connecor>Sata III</Connecor>
<Size>
<Width>70 mm</Width>
<Height>7 mm</Height>
</Size>
<Weight>53 g</Weight>
</Specs>
<Supplier>TOM001</Supplier>
<SupplierName>Tom PC Hardware</SupplierName>
<Manufacturer>Samsung</Manufacturer>
</Item>
</DisplayItem>
</Item-Request>
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.
So far what I've been able to do is
<xsl:for-each select="DisplayItem/Item/Specs">
<xsl:for-each select="node()">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</xsl:for-each>
The above lists the values on a separate line now I need to be able to display the element name.